-
Notifications
You must be signed in to change notification settings - Fork 925
docs(devlog): record the 260827/260828 bug-PR merge rounds #2806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # 000 — fix-and-reimplement round: plan | ||
|
|
||
| Base: `dev @ 50e955604`. Continues the igwanu round, which merged six PRs and left | ||
| seven open. This round's mandate is narrower and harder: **fix what can be fixed, | ||
| reimplement what cannot, and merge both** — the user explicitly authorized pushing | ||
| to contributor fork branches this round. | ||
|
|
||
| ## Re-verified state (2026-08-28, against `dev@50e955604`) | ||
|
|
||
| | PR | author | fork writable | behind | merge-tree | tsc on merged tree | own suite | | ||
| |---|---|---|---|---|---|---| | ||
| | #2747 | olddonkey | **yes** | 39 | CLEAN | OK | 15/0 | | ||
| | #2740 | luvs01 | **yes** | 39 | CLEAN | OK | 2/0 | | ||
| | #2693 | yxr1995-maker | **yes** | 131 | CLEAN | OK | 62/0 | | ||
| | #2638 | luvs01 | **yes** | 192 | CLEAN | OK | — | | ||
| | #2497 | MarcTCruz | **yes** | 399 | **CONFLICT** | unreachable | — | | ||
| | #2745 | lidge-jun | n/a | 39 | CLEAN | OK | — | | ||
|
|
||
| **#2693 passing 62/0 is the trap this round has to avoid.** Its own suite is green | ||
| and its three reviewer-reproduced defects are all real. A suite written alongside a | ||
| defect tends to encode it; that is why the reimplementation below is driven by the | ||
| defect list, not by the PR's tests. | ||
|
|
||
| ## Contention | ||
|
|
||
| `src/server/responses/core.ts` — #2745, #2638, #2497. | ||
| `src/codex/auth-context.ts` — #2638, #2497. | ||
| Everything else is disjoint. Pairwise `git merge-tree` before any second one of the | ||
| three lands; textual mergeability is not behavioral compatibility on that boundary. | ||
|
|
||
| ## Lane assignment | ||
|
|
||
| | WP | Doc | PR | lane | why | | ||
| |----|-----|----|------|-----| | ||
| | wp2 | 010 | #2747, #2740 | **FIX** | correct code, stale base only | | ||
| | wp3 | 020 | #2693 | **REIMPLEMENT** | three reproduced logic defects | | ||
| | wp4 | 030 | #2745 | **FIX or NEEDS_HUMAN** | OAuth credential boundary | | ||
| | wp5 | 040 | #2638 | **REBASE + verdict** | auth/routing boundary, 192 behind | | ||
| | wp6 | 050 | #2497 | **adjudicate** | OAuth refresh, conflicting, 399 behind | | ||
| | wp7 | 060 | — | close-out | ledger + verification | | ||
|
|
||
| ## Loop-spec | ||
|
|
||
| - Archetype: spec-satisfaction repair. Each target has a verifier that defines done. | ||
| - Write scope: `devlog/_plan/260828_bugpr_fix_and_reimplement/`, `src/` and `tests/` | ||
| changes needed to fix or reimplement a target, fork-branch rebases where | ||
| `maintainerCanModify` is true, `codex/` branches, PR metadata. | ||
| - Out of scope: `main`/`preview`, releases, enhancement PRs, history rewrite on | ||
| `dev`, approving my own PRs, pre-disclosure security notes in tracked dirs. | ||
| - Bounds: one `bun test` at a time; long suites on `lidge` via `ocx-run`. Never | ||
| `OCX_TEST_NO_QUEUE=1` — remove a stale root-owned lock instead. | ||
|
|
||
| ## Standing gates | ||
|
|
||
| 1. Compile/test evidence from the MERGED tree, never the PR head. | ||
| 2. Pairwise `git merge-tree` before two PRs sharing a file both land. | ||
| 3. Green checks are not health unless `ci` / `test N/4` / `macos` are present. | ||
| 4. **Green targeted suites are not health either — you chose the targets.** Any | ||
| function whose behavior changes gets a differential probe over every arm. | ||
| 5. `gh run rerun` replays the same commit; only a rebase moves the base. | ||
| 6. A safety net that exists in code is not one that functions. | ||
| 7. A regression must FAIL without its fix (mutation-verified) to count as evidence. | ||
|
|
||
| ## Accept criteria (mirrored into goalplan criteria[]) | ||
|
|
||
| - c1 — every target has a recorded terminal disposition verified against live `gh`. | ||
| - c2 — merged-tree compile/test gate ran for every candidate. | ||
| - c3 — each landed change carries a mutation-verified regression. | ||
| - c4 — `dev` advances only through PRs targeting `dev`; forks rebased, not rewritten | ||
| beyond the authorized scope. | ||
| - c5 — every behavior-changing function is differentially probed across all arms. | ||
| - c6 — auth/credential/OAuth surfaces land only when proven safe, else | ||
| NEEDS_HUMAN/UNSAFE with the exact unresolved question. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| # 010 — wp2 FIX lane: #2747 and #2740 | ||
|
|
||
| Both are correct code sitting on a stale base. Neither needs a logic change; both | ||
| need a rebase I am now authorized to push. | ||
|
|
||
| ## #2747 — reap the recovery proxy instead of trusting `stop` | ||
|
|
||
| Head `07b975873`, **already approved by me**, 39 behind, merge CLEAN, tsc OK, | ||
| 15/0 on its own suite on the merged tree. Fork `olddonkey/fix/update-recovery-orphan-cleanup`, | ||
| `maintainerCanModify: true`. | ||
|
|
||
| Its `ci`/`macos` red is the pre-#2766 `release version line` failure, and a rerun | ||
| cannot clear it because a rerun replays the same commit. | ||
|
|
||
| ACTION: rebase `pr2747-r3` onto `origin/dev`, force-push to the fork branch, let CI | ||
| run at the new head, merge when green. | ||
|
|
||
| **Fork-push discipline.** The previous round declined this; the user has now | ||
| authorized it. The A-gate reviewer demolished an earlier draft of this section, and | ||
| it was right: the draft said "verify `git diff` between old and new head touches | ||
| nothing but the rebase", and that check is actively misleading. A two-dot | ||
| `git diff OLD NEW` after a 39-commit rebase reports the entire intervening `dev` | ||
| range — **70 files** on #2747's real rebase — so an executor following it either | ||
| panics at 70 files or waves through a genuine rewrite. Use checks that are invariant | ||
| under rebase: | ||
|
|
||
| ```bash | ||
| # 1. the patch itself is unchanged | ||
| git diff-tree -p OLD~1..OLD | git patch-id --stable | ||
| git diff-tree -p NEW~1..NEW | git patch-id --stable # must match | ||
|
|
||
| # 2. commit-for-commit correspondence — no drops, no reorders | ||
| git range-diff origin/dev...NEW OLD_BASE...OLD # every row reads "=" | ||
|
|
||
| # 3. the PR's own file set — three-dot, not two-dot | ||
| git diff --name-only origin/dev...NEW | ||
|
|
||
| # 4. never overwrite a concurrent author push | ||
| git push --force-with-lease=refs/heads/<branch>:<author's last OID> \ | ||
| https://github.com/<AUTHOR>/opencodex.git NEW:refs/heads/<branch> | ||
| ``` | ||
|
|
||
| On #2747 these read: patch-id `efa23210f341` both sides, `range-diff` `1: = 1:`, | ||
| three-dot name list `tests/update-stop-first.test.ts` alone. | ||
|
|
||
| Two further rules absent from the first draft: | ||
|
|
||
| - **Push to the fork, never to `origin`.** Destination is | ||
| `https://github.com/<author>/opencodex.git`. The previous round created a stray | ||
| same-named branch on `origin` and had to delete it. | ||
| - **Stop if the live head is already on current `dev`.** Re-rebasing a stale local | ||
| ref rewrites a branch that is already correct. Check | ||
| `gh pr view <n> --json headRefOid` first. | ||
|
Comment on lines
+51
to
+53
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: printf '%s\n' '--- applicable repository guidance ---'
find /tmp/coderabbit-repo-knowledge/lidge-jun-opencodex-7afea732 -type f -name '*.md' -maxdepth 3 -print
printf '%s\n' '--- target section ---'
sed -n '1,90p' devlog/_plan/260828_bugpr_fix_and_reimplement/010_phase1.md
printf '%s\n' '--- related repository references ---'
rg -n --glob '*.md' 'headRefOid|origin/dev|Stop if the live head|enforce-target|force-with-lease' devlog .github README.md 2>/dev/null | head -120Repository: lidge-jun/opencodex Length of output: 25690 🏁 Script executed: printf '%s\n' '--- exact target lines ---'
sed -n '45,58p' devlog/_plan/260828_bugpr_fix_and_reimplement/010_phase1.md
printf '%s\n' '--- repository OID comparison pattern ---'
sed -n '80,94p' devlog/_plan/260827_dev_regression_and_prompt_variants/030_wp4_docs_and_stack.md
sed -n '100,110p' devlog/_plan/260824_v2_32_1_hotfix_train/010_wp1_dev_fastforward_to_release_lineage.md
printf '%s\n' '--- scoped guidance ---'
cat /tmp/coderabbit-repo-knowledge/lidge-jun-opencodex-7afea732/learnings/repo-wide.mdRepository: lidge-jun/opencodex Length of output: 3572 🌐 Web query:
💡 Result: The headRefOid field is a valid and supported field for the --json option in the GitHub CLI command gh pr view [1][2]. This field retrieves the Git object ID (the SHA) of the head reference (the tip of the pull request branch) [1][2]. It is commonly used alongside fields like headRefName and baseRefOid to provide precise reference information for automated tasks, such as generating correct diffs or performing build checks [3]. To use this field, specify it as part of the comma-separated list following the --json flag: gh pr view --json headRefOid You can also combine it with other fields as needed: gh pr view --json number,title,headRefName,headRefOid,baseRefName,baseRefOid For a complete list of fields supported by your installed version of the GitHub CLI, you can run the command with --json and no arguments: gh pr view --json Citations:
🏁 Script executed: printf '%s\n' '--- rebase/readiness checks in nearby plans ---'
rg -n -C 4 --glob 'devlog/_plan/**/*.md' \
'already.*dev|current.*dev|merge-base.*origin/dev|origin/dev.*ancestor|rev-list.*origin/dev|headRefOid' \
devlog/_plan | head -220
printf '%s\n' '--- phase context before the cited section ---'
sed -n '1,48p' devlog/_plan/260828_bugpr_fix_and_reimplement/010_phase1.mdRepository: lidge-jun/opencodex Length of output: 30695 Check the live PR head’s ancestry before rebasing. At 🤖 Prompt for AI Agents |
||
|
|
||
| **A force-push resets the readiness checklist.** `enforce-target` returns a | ||
| contributor PR to draft and unticks all four boxes on new commits — by design, since | ||
| an attestation about the old commit cannot cover a new one. So a rebase does not end | ||
| at "let CI run": the PR is a draft again, and drafts here start only | ||
| `enforce-target`/`hygiene`/`label`/`resolve-pr`/CodeRabbit, none of which compile or | ||
| test. Two boxes ("on the latest dev commit", "resolved all Codex and CodeRabbit | ||
| findings") become objectively true and can be evidenced; the local-CI attestation | ||
| and the ready-for-review confirmation belong to the author. **Ask — do not tick | ||
| another contributor's attestation.** | ||
|
Comment on lines
+55
to
+63
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: printf '%s\n' '--- repository conventions ---'
find /tmp/coderabbit-repo-knowledge/lidge-jun-opencodex-7afea732 -maxdepth 2 -type f -name '*.md' -print
printf '%s\n' '--- target document ---'
sed -n '1,95p' devlog/_plan/260828_bugpr_fix_and_reimplement/010_phase1.md
printf '%s\n' '--- referenced plan ---'
sed -n '60,82p' devlog/_plan/260828_bugpr_fix_and_reimplement/000_plan.mdRepository: lidge-jun/opencodex Length of output: 7400 🏁 Script executed: printf '%s\n' '--- relevant repository guidance ---'
cat /tmp/coderabbit-repo-knowledge/lidge-jun-opencodex-7afea732/conventions/github.md
cat /tmp/coderabbit-repo-knowledge/lidge-jun-opencodex-7afea732/learnings/devlog-plan-260807-compatibility-lab.md
printf '%s\n' '--- checklist and enforce-target references ---'
rg -n -S -C 4 'enforce-target|resolved all Codex|readiness checklist|four boxes|attestation' . \
-g '!node_modules' -g '!dist' -g '!build'Repository: lidge-jun/opencodex Length of output: 50378 🏁 Script executed: printf '%s\n' '--- GitHub conventions ---'
cat /tmp/coderabbit-repo-knowledge/lidge-jun-opencodex-7afea732/conventions/github.md
printf '%s\n' '--- workflow files ---'
find .github -type f -maxdepth 3 -print
printf '%s\n' '--- checklist implementation ---'
rg -n -S -C 8 'CHECKLIST_ITEMS|completedAtHeadSha|New commits were pushed|reset.*checklist|resolve.*findings|Codex|CodeRabbit' \
.github tests/ci-workflows.test.ts
printf '%s\n' '--- workflow implementation around enforce-target ---'
sed -n '1,260p' .github/workflows/enforce-pr-target.ymlRepository: lidge-jun/opencodex Length of output: 50376 🏁 Script executed: printf '%s\n' '--- workflow symbols and checklist logic ---'
rg -n 'CHECKLIST|checklist|mustDraft|findings|reviewThreads|latestCodeRabbit|completedAtHeadSha|synchronize' .github/workflows/enforce-pr-target.yml .github/scripts/pr-quality-state.cjs .github/scripts/pr-quality-messages.cjs
printf '%s\n' '--- workflow header and checklist definitions ---'
sed -n '1,180p' .github/workflows/enforce-pr-target.yml
printf '%s\n' '--- workflow event and state transitions ---'
sed -n '820,1145p' .github/workflows/enforce-pr-target.yml
printf '%s\n' '--- workflow completion path ---'
sed -n '1280,1390p' .github/workflows/enforce-pr-target.yml
printf '%s\n' '--- review-state contract ---'
sed -n '1,260p' .github/scripts/pr-quality-state.cjsRepository: lidge-jun/opencodex Length of output: 49453 🏁 Script executed: printf '%s\n' '--- checklist extraction, head-drift reset, and claim gate ---'
sed -n '720,875p' .github/workflows/enforce-pr-target.yml
printf '%s\n' '--- findings claim implementation ---'
sed -n '220,370p' .github/scripts/pr-quality-state.cjs
printf '%s\n' '--- checklist item definitions and reset tests ---'
rg -n -C 10 'local CI|latest dev|Codex/CodeRabbit findings|ready for review|CHECKLIST_ITEMS|reset.*boxes|untick' \
.github/scripts tests/ci-workflows.test.ts .github/workflows/enforce-pr-target.ymlRepository: lidge-jun/opencodex Length of output: 50376 🏁 Script executed: printf '%s\n' '--- exact acceptance and target locations ---'
nl -ba devlog/_plan/260828_bugpr_fix_and_reimplement/000_plan.md | sed -n '68,76p'
nl -ba devlog/_plan/260828_bugpr_fix_and_reimplement/010_phase1.md | sed -n '55,63p'
printf '%s\n' '--- exact workflow and regression-test locations ---'
nl -ba .github/workflows/enforce-pr-target.yml | sed -n '781,844p;855,1001p'
nl -ba tests/ci-workflows.test.ts | sed -n '1732,1782p;2122,2138p'Repository: lidge-jun/opencodex Length of output: 400 Require current review evidence before clearing the findings box. A rebase resets all four checklist boxes and re-drafts the contributor PR. It proves the latest-dev box only. Before clearing “resolved all Codex and CodeRabbit findings,” inspect the reviews for the rebased head and record each finding’s disposition. Keep the box unset while any finding remains. See 🤖 Prompt for AI Agents |
||
|
|
||
| ## #2740 — atomically commit cleanup run metadata | ||
|
|
||
| Head `f07ee36f2`, draft, 39 behind, merge CLEAN, tsc OK, 2/0 on the merged tree. | ||
| Fork `luvs01/fix/storage-policy-metadata-race`, `maintainerCanModify: true`. | ||
|
|
||
| Mutation oracle already proven in the previous round: revert only | ||
| `src/storage/policy.ts` + `src/storage/policy-job.ts` and the race test goes 0 pass / | ||
| 2 fail. The test drives the interleave through | ||
| `setPersistedConfigMutationBeforeCommitForTests`, so it is deterministic rather than | ||
| timing-dependent — it will not become a flake later. | ||
|
|
||
| It has only 5 checks, none of which compile or test. The merged-tree run is its first | ||
| real evidence. | ||
|
|
||
| ACTION: rebase onto `origin/dev`, force-push under lease, then ask the author to | ||
| complete the readiness checklist so the full matrix runs. Merge when green **and** a | ||
| non-author approval exists — `luvs01` is the author, so mine qualifies. | ||
|
|
||
| Recording a judgement the reviewer flagged as unstated: this PR writes through | ||
| `mutatePersistedConfig` into `config.json`, the file that holds API keys. It is not | ||
| a credential surface — it changes *how* a metadata write commits, not what is | ||
| stored, and its whole purpose is to stop clobbering concurrent edits. But "adjacent | ||
| to the file holding the keys" deserves an explicit call rather than an assumed one. | ||
|
|
||
| ## Ordering | ||
|
|
||
| Independent — `tests/update-stop-first.test.ts` vs `src/storage/*`. No pairwise | ||
| merge-tree needed. Land #2747 first (already approved), then #2740. | ||
|
|
||
| ## TESTS | ||
|
|
||
| - #2747: `tests/update-stop-first.test.ts` (the PR is the test). | ||
| - #2740: `tests/storage-policy-config-race.test.ts`. | ||
|
|
||
| ## Verification (C) | ||
|
|
||
| ```bash | ||
| bun x tsc --noEmit | ||
| bun test tests/update-stop-first.test.ts # expect 15/0 | ||
| bun test tests/storage-policy-config-race.test.ts # expect 2/0 | ||
| ``` | ||
|
|
||
| Plus exact-head CI green after each rebase, and for #2740 the mutation oracle | ||
| re-run on the rebased tree rather than the remembered one. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Reconcile the open-PR count with the target list.
Line 3 says seven PRs remain open, but the state table and lane assignment list six:
#2747,#2740,#2693,#2638,#2497, and#2745. If a seventh PR is in scope, add its lane and terminal disposition. Otherwise, change the count to six and state why the omitted PR is out of scope. This prevents criterion c1 from appearing complete while a target has no recorded disposition.Also applies to: 10-17, 33-40, 64-67
🤖 Prompt for AI Agents