Repository navigation
feat(scripts): weekly corrections report (T801 t8) - #193
Merged
Merged
Conversation
scripts/corrections-report.mjs --root DIR finds local checkouts, reads each .memory/corrections.jsonl, and lists per repository the lines with an empty promoted_to and the scopes that repeat (2 or more lines in 1 repository, or 1 scope in 2 or more repositories). It reads only: stdout or --out FILE. Checkouts of 1 repository (worktrees) merge by origin remote. docs/design/quality-loop.md names the weekly run (Learn station).
…ccess errors Cross-review of 38fe955 (openai/gpt-6.1-sol), findings 1-3: - the repository identity keeps the host and the full path, so 2 remotes with the same owner/name on different hosts do not merge; - a .memory or corrections.jsonl symbolic link is not followed; it is listed as unreadable; - only a missing path means no corrections: other errors (EACCES) are listed as unreadable.
Cross-review re-review 1 of 139df4a: 2 ports on 1 host are 2 servers. Default ports (80, 443, ssh 22) still give the plain host.
bketelsen
approved these changes
Nov 4, 2026
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Plan T801, task t8 (section "Gap 4: corrections in the repository"). Builds on #189 (t7, the corrections validator).
scripts/corrections-report.mjs --root DIR [--depth N] [--json] [--out FILE]: finds local git checkouts underDIR(a.gitfolder or file; stops at a repository root; skipsnode_modulesand symlinks; default depth 3), reads each.memory/corrections.jsonl, and reports:promoted_to;core--lucilla-…) merge byremote.origin.urlinto 1 repository; the identity keeps the host, a non-default port and the full path (a github.com remote shows asowner/name, any other host keeps its host), so SSH and HTTPS forms of 1 repository merge and 2 hosts never do. Lines merge by (date, scope, correction, evidence), and a filledpromoted_toin any checkout wins. Without a parsable remote, the name islocal:<path relative to the root>..memoryorcorrections.jsonlis not followed, and an access error other than a missing path (for exampleEACCES) is listed under unreadable lines: a checkout is never left out without a trace.git -C DIR config --get remote.origin.url; output goes to stdout or--out FILE(no folder is created). Unreadable lines are listed, not fatal; the validator stays the gate. Text output replaces control characters from correction text.docs/design/quality-loop.md(Learn station) names the weekly run (Friday hygiene line);.memory/README.mdlinks it;npm run report:corrections(not inverify).Risk tier
Risk tier: high —
test/**andscripts/**sit in thequality-gatesprotected boundary ofpolicies/agent-governance.json(minimum_risk_tier: high). The script is not added to any gate; no workflow, authority, skill or template change.Docs housekeeping
docs/design/quality-loop.mdand.memory/README.mdkeep their linksVerification
npm run verify(=make ci): 112/112 tests, docs gate greennode --test test/corrections-report.test.mjs: 15/15git worktree add --detach, removed after):groupScopesmade to return no groups → tests 1 (repeat in 1 repository), 2 (scope in 2 repositories) and 5 (JSON groups) fail; 8 pass. Restored code: 11/11.git checkout 38fe955 -- scripts/corrections-report.mjswith the new tests kept → tests 13 (2 hosts do not merge), 14 (.memorylink not followed) and 15 (denied.memorylisted) fail on assertions; 12 fails becauseparseRemoteUrlis not exported; 10 pass.git checkout 139df4a -- scripts/corrections-report.mjs→ test 12 fails on the assertiongit.example.net:8443/team/core; 14 pass.--jsonrun.node scripts/corrections-report.mjs --root ~/projects --depth 3: exit 0; 69 repositories scanned, 7 with corrections, 62 lines, 0 pending (every line on this machine is promoted).frostyard/core(5 checkouts) andfrostyard/snosi(3 checkouts) each appear once.Cross-review
Reviewer
openai/gpt-6.1-sol, codergithub-copilot/mai-code-2-flash(small edits byclaude-opus-5.5). Initial review of38fe955: Not ready, 3 blocking findings (remote identity collision across hosts,.memorysymbolic link followed, access errors silently dropped). All 3 accepted and fixed in139df4a, each with a targeted test. Re-review 1 of139df4a: findings 1-3 fixed; 1 new blocker (a non-default port dropped from the identity), fixed in6860b61with a test.