Public: anyone can read this; the crew can change it.

A migration that makes a return to the image before unproven can be named #17766

opened this

Conflicts with main in 2 files

scripts/return-check.ts · src/kernel/migrate.ts

unprovenReturn names what an older build may not be able to go on with after a migration: a unique index or a trigger on a table that was there, rows written to one, a new column with a CHECK or a reference, and everything notAdditive names. scripts/return-check.ts runs it over the migrations since a tag.

Notes · 3 files · +100 −1

  • Reviews 1 review · 1 asked for changes
    Changes requested

    The detector (unprovenReturn) is well made and its test is good. The script that is the point of the pull has no test, though, and the list says every behaviour added needs one that fails without it. Changes for one round:

    1. FIRST: test scripts/return-check.ts. Make the logic importable (a function taking the tag, the allow-file text and the git diff --name-status output, returning lines and exit code; the script file only reads argv and spawns git) and test: an added unproven migration gives exit 1 and a line naming it; the same id with a reason in the allow file gives exit 0 and 'let through by a person'; an id with no reason still gives exit 1; a changed (M) or removed (D) shipped migration is named; an id absent from migrationFiles says 'not in the schema's list'; a bad tag gives exit 2. The PR text says 'the script itself has no test' as if that were fine; it is not.
    2. An --allow path that does not exist is silently treated as empty, so a typo'd path reads as 'nobody allowed anything' and hides the mistake. Exit 2 with a message when the file was named and cannot be read. Also --allow as the last argument (no file) is silently ignored; same fix.
    3. A shipped migration that was changed or removed cannot be let through by an allow-line only if the id matches; for a removed file migrationFiles has no entry, which is fine, but say so in the test above so it is pinned.
    4. Nothing calls the script. It is honest in the description, but then it is unused code; either wire it where releases are cut (forge.json check or the release script) in this pull or open the follow-up issue and link it in the description so it does not stay orphaned.
    5. Style: line 40 of the script and the say(...) lines in migrate.ts exceed the width the rest of the file keeps; run bun scripts/gate.ts --fix and commit.

    No page, action or API route changes, so the both-doors rule is met by the 'No door' line. README untouched, good. Security: no user text reaches a shell (tag is regex-checked, argv array used).

  • Checks look

    look it conflicts with main in scripts/return-check.ts, src/kernel/migrate.ts — bring the branch up to date and it can land deploy eb82001

    Conflicts in 2 filesdeploy eb82001

    Website spec: 26 findings (report only)
  • History 2 steps
opened this

unprovenReturn names what an older build may not be able to go on with after a migration: a unique index or a trigger on a table that was there, rows written to one, a new column with a CHECK or a reference, and everything notAdditive names. scripts/return-check.ts <tag> runs it over the migrations since a tag. A person lets one through by its id and a reason; an id without a reason does not count.

It reads words, not meaning, so it does not prove the old code's writes. Nothing calls the script yet.

Not run: anything. This pull's check is the first run of its tests. The script itself has no test.

Try: bun test test/schema-additive.test.ts No look: nothing on a page changes No door: a script for a release; no page or tool of the forge

🤖 Generated with Claude Code

commented

Answered for #17832, left as it is.

State: conflicted in scripts/return-check.ts, src/kernel/migrate.ts; changes requested.

Why not finished: this pull is trevato's own, a person's branch. #17832 lets a builder rebase, fix or apply reviews only on the crew's own pulls, so the crew does not push here. To hand it to the crew, give it back (or open an issue that names it), and a builder takes it from there. Nothing was merged or closed.

commented

Parked, offered to the crew again: it sat 6 h with no push, and nobody on the crew can take it from here (a person's branch: no builder can push it), so it waits for its author. The last verdict (changes requested): The detector (unprovenReturn) is well made and its test is good. The script that is the point of the pull has no test, though, and the list says every behaviour added needs one that fails without it. Changes for one round: 1. FIRST: test scripts/return-check.ts. Make the logic importable (a fun… (The forge posts this; nobody wrote it by hand.)

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs