Skip to content

chore(memory): move the corrections to 1 file each (core ADR-0081) - #103

Merged
bketelsen merged 2 commits into
mainfrom
lucilla/corrections-migrate
Nov 13, 2026
Merged

bketelsen merged 2 commits into
mainfrom
lucilla/corrections-migrate

Conversation

@frostyard-machines

@frostyard-machines frostyard-machines commented Nov 13, 2026 •

Copy link
Copy Markdown

Summary

Every PR that fixes a blocking review point appends 1 line to .memory/corrections.jsonl, so parallel PRs conflict on each merge; GitHub's server merge ignores merge=union. core ADR-0081 moves each record to 1 file under .memory/corrections/. This PR moves the records of this repository.

  • CORE_SHA: c8962829f1f34d900e0632e63f690f81630702f1 (frostyard/core main; the scripts are taken with git show $CORE_SHA:scripts/<name>.mjs, and this repository keeps no copy)
  • Command: node migrate-corrections.mjs --root .
  • Printed: migrated 20 records (20 new files, 0 unchanged, 0 promoted)
  • Old line count: 20 (.memory/corrections.jsonl at origin/main)
  • Proof: node check-corrections.mjs --root . --base origin/main → ok corrections: 20 records, append-only vs origin/main (each old line is its <date>-legacy-<NNNN>.json record, field by field)

Other changes:

  • internal/baseline/repository_baseline_test.go (row B2): reads .memory/corrections/ by the rules of core's check-corrections.mjs (name, 5 string fields, name date, canonical form, .gitkeep), refuses the old file, and has a table test TestCorrectionsProblems (23 cases) with 1 failing case for each rule.
  • Text that named the old file now names the folder (.memory/README.md with the record rules, AGENTS.md, the PR template, docs/org-adrs.md with ADR-0081, and the other docs that named it).

Text check (prints nothing):

git grep -n 'corrections\.jsonl' -- . ':!docs/adr' ':!docs/plans' ':!CHANGELOG*' \
  ':!.memory/README.md' ':!scripts/check-corrections.mjs' ':!scripts/check-template.mjs' \
  ':!test' ':!tests' ':!*.test.*' ':!*_test.go' ':!.github/scripts/test_baseline.py' ':!.agents/skills'

.agents/skills/ is excluded: the skills there are synced from frostyard/core, and core's text names both forms until every repository has moved. The skills sync brings the new text.

Open PRs that change .memory/corrections.jsonl (they move their records after this PR)

None (gh pr list --state open on frostyard/repogen).

Risk tier

Risk tier: 1 — records moved by script with core's validator proof, doc text, and a baseline test. No risk path matches.

Verification

  • make verify green (with umask 022).
  • A negative check: with .memory/corrections.jsonl written back in a temporary copy, the baseline check fails with .memory/corrections.jsonl is retired; add a file under .memory/corrections/.

Cross-review

  • Reviewer openai/gpt-6.1-sol; coder anthropic/claude-opus-5-5. 1 review of the 10 PRs of this move in 4 batches (the baseline ports, then the text), plus 1 re-review of the fix.
  • Verdict: Ready, Blocking: none, at head dca52e9ea6e92f48860df6aa51fbeb71cb2a980b.
  • Blocking finding (batch 2, fixed in the last commit): the B2 check accepted a date with a year below 100, which core's check-corrections.mjs refuses. Guard: message-checked cases 0000-01-01 and 0099-12-31 fail and 0100-01-01 passes; record .memory/corrections/2026-11-13-pr-103-b2-year-floor.json.
  • Revert test: with the year check removed in a scratch copy, the 0099-12-31 case fails (and the 0000-01-01 case). The old B2 check fails on the moved tree (the old file is gone), and the new check fails when the old file is written back.

Parallel PRs that each fix a blocking review point append to the same
.memory/corrections.jsonl and conflict on every merge; GitHub's server
merge ignores merge=union. Core ADR-0081 moves each record to 1 file
under .memory/corrections/. Core's migrate-corrections.mjs wrote line N
as <date>-legacy-<NNNN>.json; check-corrections.mjs --base origin/main
proves each line is kept. The baseline check reads the folder.
@github-actions github-actions Bot added the level:L3 Skim label Nov 13, 2026
@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Core's check-corrections.mjs rejects years 0-99 (Date.UTC maps them to
1900-1999); the B2 port accepted them. Message-checked cases: 0000-01-01
and 0099-12-31 fail, 0100-01-01 passes. Record in .memory/corrections/.
@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 13, 2026
@bketelsen
bketelsen added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 4349d7d Nov 13, 2026
5 checks passed
@bketelsen
bketelsen deleted the lucilla/corrections-migrate branch November 13, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:L3 Skim ready-for-human Reviewed, CI green: ready for Brian to review and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants