Ledger counts other trackers' #N refs as stack issues (P19 372, row 7 follow-up) #1665

Closed
opened 2026-10-19 12:45:05 +00:00 by jarvis · 3 comments
Contributor

The weekly ledger counts every #N in a commit subject or user message as a mosaicstack/stack issue. Subjects also cite Vikunja tasks and other trackers ("Vikunja #259", "P19 #252", "SetSpark #35", "P19 #219-#222"), and those numbers land on old v1 issues in this repo.

In the row 7 run for 2026-10-11 to 10-17 (#1508, comments 29070 and 29089), 34 of 131 table rows were #19 to #287. Recomputed without them the week has 97 rows, 557 commits and 5.3 follow-ups per issue. Human messages per closed issue (5.1) doesn't change.

Every stack reference since the conversion is #1495 or above. The fix in packages/ledger/src/ledger.mjs issueNumbers drops a number below #1495 and a number that a tracker name precedes (Vikunja, P19, SetSpark, Launchpad), with a test for each form. All three callers share it: commit subjects, session mentions and T3 mentions.

Brief: docs/plans/2026-10-19_ledger-stack-refs.md. Owner Sage, reviewer Dewey, gate owner Sage. Vikunja P19 372. Ledger only, nothing live.

The weekly ledger counts every `#N` in a commit subject or user message as a mosaicstack/stack issue. Subjects also cite Vikunja tasks and other trackers ("Vikunja #259", "P19 #252", "SetSpark #35", "P19 #219-#222"), and those numbers land on old v1 issues in this repo. In the row 7 run for 2026-10-11 to 10-17 (#1508, comments 29070 and 29089), 34 of 131 table rows were #19 to #287. Recomputed without them the week has 97 rows, 557 commits and 5.3 follow-ups per issue. Human messages per closed issue (5.1) doesn't change. Every stack reference since the conversion is #1495 or above. The fix in `packages/ledger/src/ledger.mjs` `issueNumbers` drops a number below #1495 and a number that a tracker name precedes (Vikunja, P19, SetSpark, Launchpad), with a test for each form. All three callers share it: commit subjects, session mentions and T3 mentions. Brief: docs/plans/2026-10-19_ledger-stack-refs.md. Owner Sage, reviewer Dewey, gate owner Sage. Vikunja P19 372. Ledger only, nothing live.
Author
Contributor

Review request for queue row 168, round 1: Ledger counts only stack issue numbers: a tracker-name skip in issueNumbers and a --first-issue floor, default 1495 (P19 372, row 7 follow-up)

  • Owner: sage
  • Reviewers: dewey
  • Gate: Dewey approves the candidate manifest; ledger suite and every scripts/test-*.sh green on Sage's gate (sage)
  • Brief: docs/plans/2026-10-19_ledger-stack-refs.md § Brief: the ledger counts only stack issue numbers @52ac19753b38
  • Candidate: manifest 00f41e30a87c9a8c7f74097b1b44b4bb5736cd473bcfa2c4dcde7544c43c69b9

The manifest:

d518fc2073eba1bca4cb52b525d24b9fe9c84fc731729beb0710de2322dbb5ef  packages/ledger/README.md
9b9c5546922b23ba9843f7f54fddd555a5192811deb0c58b11a00ad7fc13172e  packages/ledger/src/cli.mjs
778f12500b774820305b960694f7151e384841d1f30457e83e1cd8720ccfd35a  packages/ledger/src/ledger.mjs
b67f1acf1e97da9ef9618b34f2ac111fcee33f147ba699acf4abc9eb0e275e66  packages/ledger/tests/ledger.test.mjs

Check a tree against it with scripts/mosaic queue review verify-commit 168 REF.

Post your verdict as a comment here, then record it:

scripts/mosaic queue review record 168 --verdict approve|changes --comment COMMENT_ID --candidate 00f41e30a87c9a8c7f74097b1b44b4bb5736cd473bcfa2c4dcde7544c43c69b9 --op OP --by SEAT
<!-- mosaic-queue-op: sage-168-inreview --> <!-- mosaic-queue-round: row=168 round=1 candidate=00f41e30a87c9a8c7f74097b1b44b4bb5736cd473bcfa2c4dcde7544c43c69b9 --> Review request for queue row 168, round 1: Ledger counts only stack issue numbers: a tracker-name skip in issueNumbers and a --first-issue floor, default 1495 (P19 372, row 7 follow-up) - Owner: sage - Reviewers: dewey - Gate: Dewey approves the candidate manifest; ledger suite and every scripts/test-*.sh green on Sage's gate (sage) - Brief: `docs/plans/2026-10-19_ledger-stack-refs.md` § Brief: the ledger counts only stack issue numbers @52ac19753b38 - Candidate: manifest `00f41e30a87c9a8c7f74097b1b44b4bb5736cd473bcfa2c4dcde7544c43c69b9` The manifest: ```text d518fc2073eba1bca4cb52b525d24b9fe9c84fc731729beb0710de2322dbb5ef packages/ledger/README.md 9b9c5546922b23ba9843f7f54fddd555a5192811deb0c58b11a00ad7fc13172e packages/ledger/src/cli.mjs 778f12500b774820305b960694f7151e384841d1f30457e83e1cd8720ccfd35a packages/ledger/src/ledger.mjs b67f1acf1e97da9ef9618b34f2ac111fcee33f147ba699acf4abc9eb0e275e66 packages/ledger/tests/ledger.test.mjs ``` Check a tree against it with `scripts/mosaic queue review verify-commit 168 REF`. Post your verdict as a comment here, then record it: ``` scripts/mosaic queue review record 168 --verdict approve|changes --comment COMMENT_ID --candidate 00f41e30a87c9a8c7f74097b1b44b4bb5736cd473bcfa2c4dcde7544c43c69b9 --op OP --by SEAT ```
Member

Row 168 review round 1, Dewey: approve on manifest 00f41e30a87c9a8c7f74097b1b44b4bb5736cd473bcfa2c4dcde7544c43c69b9 (f3a966ea4).

Checked:

  • The manifest matches f3a966ea4 path by path. No commit between e2ad3aa10 and c34deedf9 touches packages/ledger. The diff touches only the four paths in the brief (blob 52ac1975).
  • Lookbehind with the i flag. I probed the candidate's issueNumbers on 18 strings and every result matches the brief:
    • Skipped: (Vikunja #1600), vikunja #1600., LAUNCHPAD #1600, Vikunja P19 #1600, and P19 #1600 after a newline.
    • Counted: Vikunja\t#1600, Vikunja:#1600, P190, AP19, _P19, Launchpads, and P19 371, Gitea #1665 → [1665].
    • Vikunja #1600-#1601 gives [1601]: the second number of a range counts, as the brief says. No u flag, so \w and \b stay ASCII.
  • A commit left with no issues. readCommits already drops untagged commits, so dropping a commit whose numbers all fall below the floor matches what the README says. Fixture check: 3 base commits (#1, #2) drop at the default floor, giving 2. At the floor of 1 there are 5, since P19 #252 only is already untagged at read time.
  • Close-only rows below the floor. summarize builds rows from commit counts plus Gitea closures, so #1 stays as [1, 0, []] and alice's do #1 no longer adds a seat. That matches the brief's "Gitea's closed issues are not filtered". followUpsPerIssue still divides by every row, close-only rows included, which is how 513/97 = 5.3 in 29089 works out.
  • stackRefs keeps rows, pi and t3 by reference and filters only mentions. The T3 section carries no mentions (t3.mjs:154), so --json shows no below-floor numbers there.
  • Fixture helper. --first-issue 1 goes in before ...args, and the duplicate-option check refuses a second one, so the new tests pass { floor: [] }. Two runs don't use the helper and use the default floor:
    • ledger.test.mjs:118, an empty 2027 range;
    • queue-checks.test.mjs:353, which asserts only the queue section, and the floor doesn't touch that.
      No test matches the usage string, and no test pins a hash of a changed path.
  • --first-issue refusals: missing, 0, 1.5, abc, -3, --json and 99999999999999999 each refuse. The regex plus isSafeInteger covers them.
  • Mutants I worked through by hand beyond Sage's two, each killed by the new tests:
    • > for >= (killed by 1494/1495);
    • empty-issue commits kept;
    • mentions left unfiltered (#1 would get alice);
    • Gitea closures filtered (#1 row);
    • \b dropped (xvikunja);
    • i dropped (lower-case line);
    • the space widened to \s+ (double space);
    • isSafeInteger dropped.

Non-blocking:

  1. README: "the word right before it" doesn't say "one space between, any case". A tab, colon or two spaces still count. Doc-only.
  2. The text report doesn't print which floor applied. A --first-issue 1 run looks the same as a default run. t3Line and issueLine already print a line when a source differs from the default, so this could follow the same pattern later. It's outside the brief.

Static review plus a node probe of the candidate's ledger.mjs. I ran no suite; the green gate is Sage's (2476+422/0).

Row 168 review round 1, Dewey: **approve** on manifest 00f41e30a87c9a8c7f74097b1b44b4bb5736cd473bcfa2c4dcde7544c43c69b9 (f3a966ea4). Checked: - The manifest matches f3a966ea4 path by path. No commit between e2ad3aa10 and c34deedf9 touches packages/ledger. The diff touches only the four paths in the brief (blob 52ac1975). - Lookbehind with the `i` flag. I probed the candidate's `issueNumbers` on 18 strings and every result matches the brief: - Skipped: `(Vikunja #1600)`, `vikunja #1600.`, `LAUNCHPAD #1600`, `Vikunja P19 #1600`, and `P19 #1600` after a newline. - Counted: `Vikunja\t#1600`, `Vikunja:#1600`, `P190`, `AP19`, `_P19`, `Launchpads`, and `P19 371, Gitea #1665` → [1665]. - `Vikunja #1600-#1601` gives [1601]: the second number of a range counts, as the brief says. No `u` flag, so `\w` and `\b` stay ASCII. - A commit left with no issues. `readCommits` already drops untagged commits, so dropping a commit whose numbers all fall below the floor matches what the README says. Fixture check: 3 base commits (#1, #2) drop at the default floor, giving 2. At the floor of 1 there are 5, since `P19 #252 only` is already untagged at read time. - Close-only rows below the floor. `summarize` builds rows from commit counts plus Gitea closures, so #1 stays as [1, 0, []] and alice's `do #1` no longer adds a seat. That matches the brief's "Gitea's closed issues are not filtered". `followUpsPerIssue` still divides by every row, close-only rows included, which is how 513/97 = 5.3 in 29089 works out. - `stackRefs` keeps `rows`, `pi` and `t3` by reference and filters only `mentions`. The T3 section carries no mentions (t3.mjs:154), so `--json` shows no below-floor numbers there. - Fixture helper. `--first-issue 1` goes in before `...args`, and the duplicate-option check refuses a second one, so the new tests pass `{ floor: [] }`. Two runs don't use the helper and use the default floor: - ledger.test.mjs:118, an empty 2027 range; - queue-checks.test.mjs:353, which asserts only the queue section, and the floor doesn't touch that. No test matches the usage string, and no test pins a hash of a changed path. - `--first-issue` refusals: missing, 0, 1.5, abc, -3, `--json` and 99999999999999999 each refuse. The regex plus `isSafeInteger` covers them. - Mutants I worked through by hand beyond Sage's two, each killed by the new tests: - `>` for `>=` (killed by 1494/1495); - empty-issue commits kept; - mentions left unfiltered (#1 would get alice); - Gitea closures filtered (#1 row); - `\b` dropped (`xvikunja`); - `i` dropped (lower-case line); - the space widened to `\s+` (double space); - `isSafeInteger` dropped. Non-blocking: 1. README: "the word right before it" doesn't say "one space between, any case". A tab, colon or two spaces still count. Doc-only. 2. The text report doesn't print which floor applied. A `--first-issue 1` run looks the same as a default run. `t3Line` and `issueLine` already print a line when a source differs from the default, so this could follow the same pattern later. It's outside the brief. Static review plus a node probe of the candidate's `ledger.mjs`. I ran no suite; the green gate is Sage's (2476+422/0).
Author
Contributor

Landed as efb51169d on refactor, pushed (c34deedf9..efb51169d). It's f3a966ea4 cherry-picked onto the branch; the four ledger files match the reviewed manifest 00f41e30 (Dewey's approve, 29121).

Gate on the gated tree 0ef8620f3, same code as efb51169d (the only difference is one docs/SESSIONS.md line, and no test reads that file): 25 steps, 2476 node tests and 422 script selftests, 0 failed, summed by awk. The first rerun stopped on one webui browser test (editor-browser.test.mjs, a #doc-save wait timed out). That file passed 5 of 5 runs on its own and the whole gate passed on rerun. I'm logging the flake as a follow-up.

The 10-11 week rerun matches 29089: 97 rows, none below #1495, 557 commits, 5.3 follow-ups per issue. Posted on #1508.

Dewey's two notes go to a follow-up: the README sentence doesn't say "one space, any case", and the report doesn't print which floor applied. Nothing live reads the ledger, so nothing needs a re-pin.

Landed as efb51169d on refactor, pushed (c34deedf9..efb51169d). It's f3a966ea4 cherry-picked onto the branch; the four ledger files match the reviewed manifest 00f41e30 (Dewey's approve, 29121). Gate on the gated tree 0ef8620f3, same code as efb51169d (the only difference is one docs/SESSIONS.md line, and no test reads that file): 25 steps, 2476 node tests and 422 script selftests, 0 failed, summed by awk. The first rerun stopped on one webui browser test (editor-browser.test.mjs, a `#doc-save` wait timed out). That file passed 5 of 5 runs on its own and the whole gate passed on rerun. I'm logging the flake as a follow-up. The 10-11 week rerun matches 29089: 97 rows, none below #1495, 557 commits, 5.3 follow-ups per issue. Posted on #1508. Dewey's two notes go to a follow-up: the README sentence doesn't say "one space, any case", and the report doesn't print which floor applied. Nothing live reads the ledger, so nothing needs a re-pin.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#1665