Repository navigation
docs: require shared-checkout changes to end in git - #18584
Closed
magnum8237 wants to merge 2 commits into
Closed
magnum8237 wants to merge 2 commits into
magnum8237 wants to merge 2 commits into
Conversation
Adds AGENTS.md Git Workflow -> "Shared-checkout changes must not go orphan" plus Hard Rule cheaper-inference#24: a change applied to the shared main checkout ends the session either committed on its own branch or recorded as a known-divergence issue; a production build regenerated from an uncommitted tree is declared alongside it; and pending work is measured against the active release branch, never the local HEAD. Closes the gap that let the 2026-08-15 repair sit outside git for two and a half months. It was classified "local repair, not feature development", used to regenerate the build serving port 20128, and never committed, so the running service depended on code held in no commit. By 2026-10-29 the repair had already landed upstream as 37d7078 (PR cheaper-inference#10198, merged 2026-08-12 15:58, after the local HEAD): of 88 files only 13 were still needed, and the local HEAD was 5,266 commits behind release/v3.8.53 -- measuring against the stale local HEAD was what made merged code look unfinished. Rule cheaper-inference#23 (_tasks/) already exists on this base, so the new rule is cheaper-inference#24 and nothing was renumbered. Also bumps the "23 Hard Rules" count in CLAUDE.md, GEMINI.md and docs/i18n/phi/CLAUDE.md (the only locale mirror stating it).
A verification command read from a stale checkout may already have been corrected upstream, and such a command typically fails silently rather than erroring, so a red base reads as green. Measured on 2026-10-29: the main checkout's AGENTS.md still carried a base-green query naming the pre-rename repository, and "gh issue list --search" resolves that to nothing instead of following the redirect. The open base-red issue cheaper-inference#17219 for release/v3.8.53 therefore read as "no issue" across several sessions, and the failures inherited from the base looked like each contributor's own defect. Reproduced both ways: the old repository name returns 0 rows, the canonical name returns 1.
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.
What
Documentation only. Closes the gap that let a production repair sit outside git for two and a
half months in the shared main checkout.
AGENTS.md→ Git Workflow → new subsection "Shared-checkout changes must not go orphan",placed immediately after "Worktree isolation". Rule docs: add npm badge, CLI options, and release workflow to README #19 keeps development out of the shared
checkout; this covers what is already sitting in it.
AGENTS.md→ Hard Rule feat: domain layer, error codes, request ID, fetch timeout (Batch A) #24, short form pointing at that subsection.23 → 24 Hard RulesinCLAUDE.md,GEMINI.mdanddocs/i18n/phi/CLAUDE.md(the only one of the 66 locale mirrors that states the count).The rule has four parts:
reason to touch the shared tree to get a service running again; it stops being a reason for
the work to live outside git. Every change there ends the session either committed on a
branch of its own (the PR can come later) or recorded as a known divergence — an open issue
naming the files, why it was not committed, and a review date. There is no third state.
The served build then depends on code that exists in no commit, so discarding the working
tree and rebuilding takes production down with no warning and no trace of what was lost.
HEAD. Resolve the active release branchfirst (the highest
release/v*on origin) and diff against that. A stale checkout reportsalready-merged code as pending work.
upstream, and such a command usually fails silently — returning nothing instead of
erroring — so a red base reads as green. Re-check it against the active release branch before
trusting what it reports.
Why — two incidents, same root cause
2026-08-15 — work lost to the classification. A build-breaking repair (the
#9199mergeresidue that threw a
ReferenceErrorand took down the model catalog and the dashboard screens)was applied straight to the shared main checkout and classified "local repair solicited by the
operator, not feature development". That classification is what kept it from ever becoming a
branch or a PR. The production build serving port 20128 was then regenerated from that working
tree, and the watchdog only rebuilds when
BUILD_IDis absent — so the running service came todepend on code held in no commit at all.
2026-10-29 — triage against the real baseline. The tree still read as ~90 pending changes:
37d70785c7— "fix(build): repair broken production build, red lint gate and SWR crash (#10198)", merged 2026-08-12 15:58, i.e. after the localHEAD838e4d688HEAD5,266 commits behindrelease/v3.8.532026-10-29 — the same stale file then corrupted the verification itself, which is why part 4
exists. The main checkout's
AGENTS.mdstill carries a base-green query naming the pre-renamerepository (
diegosouzapw/OmniRoute, which now redirects tocheaper-inference/OmniRoute).gh issue list --searchdoes not follow that redirect — it resolves to nothing and exits 0.So the open
base-redissue #17219 forrelease/v3.8.53read as "no issue" across severalsessions working this campaign, a red base looked green, and the CI failures inherited from the
base looked like each contributor's own defect. Reproduced both ways while preparing this PR:
An earlier revision of this very PR body claimed "no open base-red issue exists" — produced by
that same stale command, from the same stale file. It is corrected above. That is the failure
mode part 4 describes: not work lost, but a check that lies quietly and moves the blame onto the
contributor.
Every figure in the table was re-verified against
origin/release/v3.8.53in the session thatopened this PR (
git log,gh pr view 10198,git merge-base --is-ancestor,git rev-list --count) rather than taken from the triage report. The full report lives in theseparate, gitignored
_tasksrepo at_tasks/research/2026-10-29-triagem-reparo-local-2026-08-15.md.Gates
npm run check:docs-all, run by hand — 5 of 7 green; the 2 failures are inherited from thebase tip (#17219) and are not touched by this diff:
check:docs-synccheck:docs-frontmatterdocs/providers/GITHUB-COPILOT.md,docs/providers/grok-cli-media.mdlack frontmattercheck:docs-countsdocs/i18n/*/README.md"213 migrations" vs 214, plusAGENTS.md's own stale "377 LLM providers" / "213 migrations" on lines 32/40)check:env-doc-synccheck:deprecated-versionscheck:doc-linkscheck:fabricated-docsProof the two failures are not mine: both gates were run against a pristine export of
origin/release/v3.8.53(git archive, no local changes) and produced the identicalfrontmatter failure and drift count; the stale counts flagged in
AGENTS.mdare its existinglines 32 and 40, and this diff adds zero lines containing those numbers, nor any file under
docs/providers/or anyREADME.md. Per Git Workflow → "Base-green check" the inheritedfailures were deliberately not fixed here — a base-red fix is its own freeze-gated
fix/release-vX.Y.Z-baseredsPR. Norelease-freezeis active (checked against the canonicalrepository name).
Notes for the reviewer
local-divergencelabel: the rule names this as the marker label for a recordeddivergence, in the same spirit as the existing
release-freeze/base-red/needs-vpsmarkers. It does not exist in the repo yet — the text says "created on first use", and no
label was created by this PR.
protected-surface: this PR touches agent-instruction surfaces (AGENTS.md,CLAUDE.md,GEMINI.md), so it needs that label and the per-PR operator OK before merging. The accountthat opened it has read-only access upstream and cannot apply labels — please add it.
.husky/_/cp -alworktree recipe in the adjacent "Worktreeisolation" subsection is deliberately untouched — a separate PR owns that fix, so a reviewer
can approve either without blocking the other.
quality-baseline.json, no gate changes. Built in an isolated worktree under.claude/worktrees/; the shared main checkout was not touched.action_required: GitHub will not run CI until a maintainer approves the workflow runs, so theabsence of checks here is neither a green nor a red. When they do run, this PR inherits the
base tip's failures — 🔴 Release branch not green: release/v3.8.53 #17219 records 8 hard failures on
release/v3.8.53, and itsci.yml:docs-sync-strict → npm run check:docs-allentry is README stale-version drift(
OmniRoute 3.8.52… vspackage.json3.8.53), which is the samecheck:docs-countsREADMEdrift measured locally above. The session's CI auto-fix automation was therefore switched
off for this PR: reacting to those failures would mean repairing base-red inside a feature
branch, which Git Workflow → "Base-green check" forbids. Please compare any red check here
against 🔴 Release branch not green: release/v3.8.53 #17219 before attributing it to this diff — which is exactly what that issue's own
header asks reviewers to do.