docs: row 168 brief amended before build, floor moves to a --first-issue option (#1665); window-plan: mos-0838 rulings in the 3i draft

This commit is contained in:
jason.woltje committed 2026-10-19 07:52:47 -05:00
1 parent e69e646b40
commit 03586947af
2 files changed
+46 -12

No files matched your search

@@ -107,3 +107,24 @@ Read only, at 2026-10-19T12:48Z on c16ba2f0c:
- the `INSERT INTO` lines in `usage.mjs` and `broker.mjs`.
Nothing live was read.
## Mos's rulings (mos-0838, 2026-10-19)
- D1, option (b). Window A at 5fa9cc8f2, 3h, no `--migrate`, plain rollback, rows 129,
164, 125, 155, 154, 156, 165 and 167, plus Jason's `mosaic plugins set`. Window B at
the tip carries only row 126 and 3h to 3i, with Jason present. If the tip has moved
past ca15d73e9 by then, B's target is ca15d73e9, unless B's plan checks and lists
every later code commit as schema-neutral.
- D2, the tool blob. Each final plan pins the blob REPO holds that day, and Darkwing
reruns the scratch `--plan` per target with it. If the blob is still 4b16e848, Window
A doesn't need row 163 first, because P2 rehearsed that blob. A new blob (row 166
landed) gets a P2-style scratch activate and rollback before it runs against live.
Row 163 can do that but isn't required. Window B always gets a scratch
`activate --migrate` 3h to 3i with the day's blob, then `rollback --restore` on that
scratch root.
- D3, the restore caveat. The four points stand. Before any `rollback --restore`, the
report to Jason covers both `usage_records` and `instance_names` rows written after
the backup stamp, read read-only from the live store. Nobody changes the
post-attempt copy.
- No reply is due until the final plans are ready for review, after the 8e7ea89a1
window is live and checked.
+25 -12
View File
@@ -28,24 +28,37 @@ Every stack issue cited since the conversion is #1495 (the conversion issue) or
## The fix
1. A floor. `issueNumbers` drops any number below 1495. Name the floor as a constant with a
comment that cites #1495. This handles the bare and range forms on its own.
2. A tracker-name skip. `issueNumbers` drops a `#N` when the word right before it is
`Vikunja`, `P19`, `SetSpark` or `Launchpad`, case-insensitive, with one space between. This
covers a Vikunja task id that someday reaches 1495. `Gitea #N` and `issue #N` stay counted.
3. Change it in `issueNumbers` itself so all three callers get it. Update the existing test at
`packages/ledger/tests/ledger.test.mjs:235`, which uses `#1` and `#2`, to numbers at or
above the floor, and keep what it checks (dedupe, `abc#3`, `#0`, `#4x`).
4. `packages/ledger/README.md` says in one sentence which numbers the ledger counts.
1. A tracker-name skip, in `issueNumbers` so all three callers get it. It drops a `#N` when
the word right before it is `Vikunja`, `P19`, `SetSpark` or `Launchpad`, case-insensitive,
with one space between. This covers a Vikunja task id that someday reaches 1495.
`Gitea #N` and `issue #N` stay counted. The existing test at
`packages/ledger/tests/ledger.test.mjs:235` keeps passing unchanged.
2. A floor, applied once in `cli.mjs` `main` after the reads and before `summarize`: one
helper in `ledger.mjs` drops numbers below the floor from each commit's issues (a commit
left with none drops out of the commit total, as an untagged commit does) and from the
session mentions. Issues Gitea lists as closed in range are Gitea's own data and are not
filtered. This handles the bare and range forms.
3. The floor is a new option, `--first-issue N`, a positive integer, default 1495, with a
comment that cites #1495. Most CLI fixtures use `#1` and `#2`, so their runs pass
`--first-issue 1` and keep testing what they test now. The weekly routine command doesn't
change.
4. `packages/ledger/README.md` replaces the "no attempt to remap" sentence in Counting rules
with which numbers the ledger counts, and the usage line lists the option.
Amended 2026-10-19 by Sage before the build started: the first version put the floor inside
`issueNumbers`, which would have broken every fixture that uses a small number.
## Acceptance
- One test per form listed above, each asserting the exact array `issueNumbers` returns. A
`readCommits` test on a stand-in repo with a mixed subject shows only the stack issue.
- One test per form listed above, each asserting the exact array `issueNumbers` returns. A CLI
run on the fixture repo with the default floor shows only stack issues in the table, the
commit total and the seat mentions. `--first-issue` with a missing, zero or non-integer
value refuses.
- Two mutants, each failing at least one new test: remove the floor, and remove the
tracker-name skip.
- The ledger suite and every `scripts/test-*.sh` green on Sage's gate. Dewey approves the
candidate manifest.
- After landing, Sage reruns the 10-11 week and posts the corrected totals on #1508. They must
match the read-only recompute in 29089 (97 rows, 557 commits, 5.3 follow-ups per issue).
- The diff touches only `packages/ledger/src/ledger.mjs`, its tests and the ledger README.
- The diff touches only `packages/ledger/src/ledger.mjs`, `packages/ledger/src/cli.mjs`,
`packages/ledger/tests/ledger.test.mjs` and the ledger README.