GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||
GeezerVison is showing github.com — fix(github-ci): advanceSnapshot must not move head_sha when default_branch is unknown (#6945) by dezren39 · Pull Request #7058 · developing-today/code Conversation
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 49 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: c1b5cc1c83
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| describe("advanceSnapshot default_branch guard (#6945)", () => { | ||
| it("existing NULL default_branch + side-branch push writes nothing", async () => { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Cover the snapshot-head invariant with property tests
This suite covers the snapshot-head invariant only with hand-written examples, but the repository testing doctrine requires property-based coverage for meaningful invariants and explicitly says examples do not replace it. Add generated combinations of row existence, stored and payload defaults, push refs, and deletion SHAs, using the captured SQL and arguments to verify that head_sha is written only for a non-deletion push matching the resolved default branch.
AGENTS.md reference: AGENTS.md:L41-L45
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 33cb856: added a property-based test for exactly this invariant in test/sink.test.ts ("advanceSnapshot property: head_sha invariant"). It generates 250 seeded combinations of row existence × stored default × payload default × push ref (incl. a tag ref) × deletion/non-deletion SHA, and checks the captured Turso INSERTs against the named oracle — the resolved default branch (stored, else payload, else unknown) — asserting head_sha is written only for a non-deletion push matching the resolved default, with the push's after SHA as the value. Full worker suite passes locally on the laptop (sink.test.ts 11/11; the earlier full run was 28/28 before this addition).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Disposition (task 13351, lane code-f): this P1 is already addressed on the current head. The Codex review round was on c1b5cc1 (comment created 2026-11-08T02:26:29Z); three minutes later commit 33cb856 (test(github-ci): property-test the advanceSnapshot head_sha invariant (#6945)) added the requested property coverage to pkgs/github-ci/worker/test/sink.test.ts: a seeded-PRNG generated grid over row existence x stored default (null/main/dev) x payload default (undefined/null/main/dev) x push ref (main/dev/feature-x/tag) x after SHA (real/zero deletion), 250 iterations, checked against the named oracle (resolved default = stored else payload else unknown; head_sha written only for a non-deletion push whose ref is exactly refs/heads/, value = the push after SHA) via the captured Turso INSERT SQL and args. No code change needed; the examples remain as smoke/acceptance alongside the property test, per the doctrine split.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Disposition (queue worker lane code-g, task 13351): addressed in commit 33cb856, which adds the property coverage this finding asked for — advanceSnapshot property: head_sha invariant in test/sink.test.ts generates 250 seeded combinations over the full factor grid (row existence × stored default × payload default × push ref × deletion SHA) and checks each against the resolved-default oracle via the captured Turso pipeline INSERTs: head_sha is written only for a non-deletion push matching the resolved default, with the push's after SHA as the value. Verified fresh on the laptop at head 33cb856: targeted sink.test.ts 11/11 pass, full worker suite 29/29 pass, tsc --noEmit clean.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Disposition from task 13351 (queue worker, lane code-l): the finding's premise was partly stale and partly fair. The reviewed head (33cb856) already contained a generated-combination property test for exactly this invariant (seeded PRNG over row existence x stored default x payload default x push ref x deletion SHA, checked against a named oracle via the captured Turso INSERTs) — but it sampled 250 draws from the 192-cell grid, so coverage was probable, not proven. Fixed in 287912a: the property test now enumerates the full factor grid exhaustively (all 192 cells, with a closing assertion on the cell count) and checks every cell against the same oracle. Verified locally: bun run test in pkgs/github-ci/worker — 29/29 tests pass (sink.test.ts 11/11).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 Agent note · parked
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 Agent note · parked
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
agent-note:v1 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
🤖 Agent note · done
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
github-ci(worker): advanceSnapshot treats an unknown (NULL) default_branch as every branch — a side-branch push overwrites agent_repo_snapshots.head_sha
There was an error while loading. Please reload this page.