fix(gate): the plan-code guard catches decision codes, and the purge takes them
A plan's decision ids (`D1`, `D4`, `D6-A`) cited in 11 comments and test titles named a document no reader of this repo has, and the guard had no pattern for them. It has now (mirrored in audit_metrics), with cases for each form the citations took and for the look-alikes it must leave alone (a JPEG marker, "3D"); the 11 lines say their why without the id. Case test seen red without the pattern, the scan red on a planted `D9:`.
This commit is contained in:
@@ -87,7 +87,7 @@ describe("two-step sequences", () => {
|
||||
expect(calls).toEqual(["goDownloads"]);
|
||||
});
|
||||
|
||||
// No second step needs a modifier (D1), so a chord with one is the reader changing their mind: it
|
||||
// No second step needs a modifier (see the page-level rows below), so a chord with one is the reader changing their mind: it
|
||||
// must reach its own row. Swallowed, `g` then Ctrl+K opened the browser's search, not the palette.
|
||||
it("lets a modifier chord abandon the sequence and match as itself", () => {
|
||||
const calls: string[] = [];
|
||||
@@ -148,7 +148,7 @@ describe("page-level scopes under a layer", () => {
|
||||
});
|
||||
|
||||
describe("the page-level rows", () => {
|
||||
// Owner rule D1, enforced rather than commented: on the Hungarian layout the owner types on, a
|
||||
// The owner's rule, enforced rather than commented: on the Hungarian layout the owner types on, a
|
||||
// chord with a modifier (or `/`, `?`, which ARE Shift chords there) is not a quick key.
|
||||
it("need no modifier and no Shift-only character", () => {
|
||||
for (const s of SHORTCUTS) {
|
||||
|
||||
@@ -24,10 +24,10 @@ const ALLOWED = new Set([
|
||||
// Anything else that looks like a code is one — `"""E30:`, `it("E36:`, `# S6:` and `S3's` included.
|
||||
const NOT_CODES = /\bS\d{1,2} ?·? ?E\d+|\btitle[=:] ?"[ES]\d{1,2}"|\bE4\/E7\/E9\b/g;
|
||||
const PLAN_CODES = [
|
||||
// an epic (`E28`, `E9.5`, `E28/E30`), an older roadmap item (`R14`), a sprint (`S6`, `S3e2`) or a
|
||||
// phase (`P1`) — not `E2E`, not a ruff rule (`S110`), not `S3h`, the media-card decision
|
||||
// docs/DESIGN.md is headed by
|
||||
/\b(?:E\d{1,2}(?:\.\d+)?|R\d{1,2}|S(?!3h\b)\d{1,2}(?:[a-z]\d?)?|P\d)\b/,
|
||||
// an epic (`E28`, `E9.5`, `E28/E30`), an older roadmap item (`R14`), a sprint (`S6`, `S3e2`), a
|
||||
// phase (`P1`) or a plan's decision (`D1`, `D6-A`) — not `E2E`, not a ruff rule (`S110`), not
|
||||
// `S3h`, the media-card decision docs/DESIGN.md is headed by
|
||||
/\b(?:E\d{1,2}(?:\.\d+)?|R\d{1,2}|S(?!3h\b)\d{1,2}(?:[a-z]\d?)?|P\d|D\d{1,2})\b/,
|
||||
// a review round (`round 4`, `deep-review`)
|
||||
/\b[Rr]ound[ -]\d|deep-review/,
|
||||
];
|
||||
@@ -58,6 +58,9 @@ describe("plan codes", () => {
|
||||
'"""E30: the new sink.',
|
||||
'it("E36: keeps x", () => {',
|
||||
"// both sides (E28/E30)",
|
||||
"# D1: a newly shared download is downloadable by default",
|
||||
"// binge stays under the viewer's control (D6-A)",
|
||||
"// (owner decision D4)",
|
||||
"# the roadmap's R6/R7 pair",
|
||||
"// held since E9.5",
|
||||
"// (S6) moved it",
|
||||
@@ -79,6 +82,8 @@ describe("plan codes", () => {
|
||||
'expect(btn.textContent).toContain("S2 · E1");',
|
||||
"// the S3h media card",
|
||||
'"S110", "S112",',
|
||||
"# the JPEG SOI marker (0xFF 0xD8 0xFF)",
|
||||
"// a 3D view",
|
||||
];
|
||||
expect(cited.filter((l) => !isPlanCode(l))).toEqual([]);
|
||||
expect(clean.filter(isPlanCode)).toEqual([]);
|
||||
|
||||
Reference in New Issue
Block a user