Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/signals/focus-manifest.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { parse as parseYaml } from "yaml";

Check notice on line 1 in src/signals/focus-manifest.ts

View check run for this annotation

Deleted GitHub App / Gittensory Context

Issue discovery is disabled for this repo

This repo is configured for direct contribution review rather than issue-discovery flow.

Check notice on line 1 in src/signals/focus-manifest.ts

View check run for this annotation

Deleted GitHub App / Gittensory Context

Open PR queue is busy

This repo has a busy open PR queue in the local Gittensory cache.

Check notice on line 1 in src/signals/focus-manifest.ts

View check run for this annotation

Deleted GitHub App / Gittensory Context

PR author has maintainer association

This PR appears to come from a maintainer-associated account.
import type { GatePolicyPack, GateRuleMode, JsonValue, RepositorySettings } from "../types";

export type FocusManifestSource = "repo_file" | "api_record" | "none";
Expand Down Expand Up @@ -179,7 +179,7 @@
* text must not leak reward, wallet/key, ranking, or local filesystem path material.
*/
export function isFocusManifestPublicSafe(text: string): boolean {
return !/\b(reward\w*|score\w*|wallet|hotkey|coldkey|mnemonic|farming|payout|ranking|raw[-\s]?trust|trust score|private[-\s]?reviewability|reviewability)\b|\/Users\/|\/home\/|\/tmp\/|[A-Z]:\\Users\\/i.test(text);
return !/\b(reward\w*|score\w*|wallets?|hotkeys?|coldkeys?|seed[-\s]?phrases?|mnemonics?|private[-\s]?keys?|farming|payouts?|rankings?|raw[-\s]?trust(?:[-\s]?scores?)?|trust[-\s]?scores?|private[-\s]?reviewability|reviewability(?:[-\s]?internals?)?|private[-\s]?scoreability|scoreability|public[-\s]?score[-\s]?(?:estimate|prediction|claim)s?|estimated[-\s]?scores?|score[-\s]?(?:estimate|prediction|preview)s?)\b|\/Users\/|\/home\/|\/tmp\/|[A-Z]:\\Users\\/i.test(text);
}

function emptyManifest(source: FocusManifestSource, warnings: string[] = []): FocusManifest {
Expand Down
13 changes: 13 additions & 0 deletions test/unit/focus-manifest.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";

Check notice on line 1 in test/unit/focus-manifest.test.ts

View check run for this annotation

Deleted GitHub App / Gittensory Context

Issue discovery is disabled for this repo

This repo is configured for direct contribution review rather than issue-discovery flow.

Check notice on line 1 in test/unit/focus-manifest.test.ts

View check run for this annotation

Deleted GitHub App / Gittensory Context

Open PR queue is busy

This repo has a busy open PR queue in the local Gittensory cache.

Check notice on line 1 in test/unit/focus-manifest.test.ts

View check run for this annotation

Deleted GitHub App / Gittensory Context

PR author has maintainer association

This PR appears to come from a maintainer-associated account.
import {
buildFocusManifestGuidance,
compileFocusManifestPolicy,
Expand Down Expand Up @@ -911,6 +911,19 @@
expect(m.warnings.some((w) => /review\.note.*public-safe/.test(w))).toBe(true);
});

it("drops review override terms covered by the public comment sanitizer", () => {
const m = parseFocusManifest({
review: {
footer: { text: "Maintainer note: include seed phrase details." },
note: "Intro note mentions private rankings.",
},
});
expect(m.review.footerText).toBeNull();
expect(m.review.note).toBeNull();
expect(m.warnings.some((w) => /review\.footer\.text.*public-safe/.test(w))).toBe(true);
expect(m.warnings.some((w) => /review\.note.*public-safe/.test(w))).toBe(true);
});

it("ignores invalid field toggles and non-mapping footer/fields with warnings", () => {
const m = parseFocusManifest({ review: { footer: ["nope"], fields: "nope" } });
expect(m.review.present).toBe(false);
Expand Down
4 changes: 4 additions & 0 deletions test/unit/policy-sanitizer.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";

Check notice on line 1 in test/unit/policy-sanitizer.test.ts

View check run for this annotation

Deleted GitHub App / Gittensory Context

Issue discovery is disabled for this repo

This repo is configured for direct contribution review rather than issue-discovery flow.

Check notice on line 1 in test/unit/policy-sanitizer.test.ts

View check run for this annotation

Deleted GitHub App / Gittensory Context

Open PR queue is busy

This repo has a busy open PR queue in the local Gittensory cache.

Check notice on line 1 in test/unit/policy-sanitizer.test.ts

View check run for this annotation

Deleted GitHub App / Gittensory Context

PR author has maintainer association

This PR appears to come from a maintainer-associated account.
import { __controlPanelRolesInternals, buildControlPanelRoleSummary } from "../../src/services/control-panel-roles";
import {
buildCollisionReport,
Expand Down Expand Up @@ -395,12 +395,16 @@
"hotkey abc123",
"coldkey xyz",
"mnemonic phrase",
"seed phrase",
"private key",
"payout estimate",
"reward estimate value",
"raw trust score",
"trust score context",
"farming strategy",
"private reviewability",
"private rankings",
"rankings",
"score context",
"scored output",
];
Expand Down