Skip to content

Refactor: Flatten authbridge/ into the repo root - #1134

Merged
huang195 merged 24 commits into
rossoctl:mainfrom
huang195:refactor/flatten-authbridge
Sep 26, 2026
Merged

huang195 merged 24 commits into
rossoctl:mainfrom
huang195:refactor/flatten-authbridge

Conversation

@huang195

@huang195 huang195 commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

What

authbridge/ held nearly every tracked file in the repo and separated nothing from nothing. It dates from when this repo was kagenti-extensions and held several extensions; the only other one, client-registration, moved into the operator long ago. This flattens it into the repo root.

There is no authbridge/ directory afterwards.

The level was not merely cosmetic — it was carried by the public install URL, all 12 Go module paths, 36 workflow references, and 6 dependabot module directories. It also gets more expensive to remove over time: the same sweep was 326 files at the Kagenti→Rossoctl rename and 214 at rossocortex→cortex.

Read it in commit order

The commits are meant to be read individually rather than as one large diff:

  1. install.sh resolves --ref= against both layouts. Lands first because it is correct before and after the move.
  2. The mechanical sweep + its fix round. 12 module paths, 36 workflow refs, 6 dependabot dirs, new root .dockerignore.
  3. authbridge/README.md → docs/architecture.md and 33 links retargeted.
  4. The two CLAUDE.md files merged into one root file. Three commits: net-new sections, reconciled overlaps, deletion.
  5. New canonical install URL + regenerated demo SVG + stale path fixes.
  6. Migration script retired, spec marked implemented.
  7. Two review rounds — the final cross-task findings, then three path/label drift classes that the sweep's trailing-slash pattern could not match.

Plus doc commits carrying the design spec, the plan, and corrections found along the way.

Three things this got for free

The subtree moved up together, so paths relative to it are unchanged. Verified, not assumed:

  • replace directives — cmd/abctl/go.mod's ../../authlib resolves correctly before and after; cmd/abctl is two levels deep both times.
  • go.work's use list — relative to go.work, which moved with them.
  • Dockerfile COPY paths — relative to the build context, which moved too.

Three things that were not free

Eleven fixed-depth paths climb out of the subtree, so no substitution could see them. The design spec listed seven; the real count was eleven, and two of the original seven turned out to need no change because their target moved with them. The test is one question: does the target also move? requirements.txt does. .venv and agent-examples don't.

Thirty-three links broke with nothing in the diff to see. These are relative links whose text never changed while the file moved beneath them — 12 inbound to the architecture doc, 21 outbound from inside it. A diff-driven audit is structurally blind to this class; only resolving targets on disk finds it. That cost a review round before we worked it out.

A root .dockerignore became load-bearing. Four images built from context: ./authbridge, which excluded the repo root. They now build from context: ., so without it Docker would ship .git and .worktrees to the daemon. Measured with binaries present: 111.5 MB → 12.0 MB.

Deliberate exclusions — please don't "fix" these

install.sh:485 keeps probing the legacy path. ${REPO}/${ref}/authbridge/install.sh is supposed to be there: it locates installers inside pre-flatten releases, whose git trees still have the file at that path. The new installer tries ${ref}/install.sh first and falls back here on a clean 404 only. Rewriting this line makes both lookup paths identical and breaks --ref= for every existing release. install_test.sh's fake-curl stub keys on this string for the same reason.

docs/superpowers/ keeps its stale authbridge/ strings. Dated design records, per the precedent set in #1125.

The old install URL 404s, deliberately

The canonical command becomes:

curl -fsSL https://raw.githubusercontent.com/rossoctl/cortex/main/install.sh | sh

No shim at the old path. That was decided after measuring who references main/authbridge/install.sh in repository trees: 8 here, 2 in rossoctl/rossoctl's current docs, 3 in rossoctl/.github's versioned archives for 0.7/0.8 — all inside the rossoctl org, no third parties.

That measurement read files, so it could not see release notes, and @esnible found two live ones that carry the URL:

gh api repos/rossoctl/cortex/releases --paginate \
  --jq '.[] | select(.body | test("authbridge/install\\.sh")) | .tag_name'
# -> main-latest, v0.7.0-alpha.4   (2 of 43)

The two-path probe cannot rescue those: it lives inside install.sh, so a 404 on the bootstrap fetch happens before any of it runs. A root-level install-demo.sh would not help either — it serves a different URL than the one in the notes. Merge-time action: rewrite the URL in those two releases' notes to main/install.sh.

The only casualty is a reader following the archived v0.7/v0.8 docs. Measured failure mode: curl -fsSL <404> | sh gives curl exit 56 with 49 bytes on stderr, then sh reads empty stdin and exits 0 — so an interactive user sees the 404, but anything scripted around the pipeline sees success having installed nothing. Accepted; a permanent file at authbridge/install.sh would re-create the directory this PR deletes, with no checkable condition for ever removing it.

Follow-up needed: the two release notes above, at merge. Separately, rossoctl/rossoctl's two current docs pages (docs/get-started/laptop.md, docs/concepts/experiments/cost-control.md) want a coordinated update. The versioned archives are left alone by convention.

Verification

All Go commands with GOWORK=off, as CI runs them:

  • go mod tidy -diff clean in all 12 modules — the gate that build, vet and test all pass while it fails
  • authlib: build, vet, go test -race across 60 packages
  • cmd/abctl, authbridge-{proxy,envoy,praxis}, storage/redis, scripts/{profile-tags,readme-demo}: build, vet, test
  • install_test.sh 113/113, including new cases for both --ref eras
  • pytest tests/ 12/12 — this one caught a real break: tests/test_keycloak_sync.py loaded parents[1]/"authbridge"/…, so pytest failed at collection. *.py was in neither the sweep's globs nor my original gate list.
  • readme-demo staleness check — fails before regeneration, passes after, which is what proves the SVG was regenerated rather than patched
  • a real docker build of the proxy image, to prove the context change
  • shellcheck across 48 scripts, clean at error severity

Expected non-failures: cmd/authbridge-cpex needs cgo and a pinned libcpex_ffi.a, so it cannot vet locally — build.yaml covers it via the image build. cmd/abctl's TestRunExec_BeforeFirstStart… fails on the dev machine from an ambient SSL_CERT_FILE; reproduces on unmodified main.

Downstream

rossoctl/operator and rossoctl/rossoctl-cli compile against this module. They need:

github.com/rossoctl/cortex/authbridge/authlib…  →  github.com/rossoctl/cortex/authlib…

Confirmed empirically by cloning rossoctl-cli with a local replace: it fails at "finding module for package …/authlib/…" across ~30 subpackages. Neither breaks when this merges — both pin pre-flatten pseudo-versions — but both break on their next cortex bump. Deliberate, and worth a coordinated pair of PRs.

Two items folded in beyond the flatten

  • demos/README.md gained context-guru, echo and mtls. PR Docs: Correct the docs and repo config to match the tree #1125's body claimed it fixed this and only fixed CLAUDE.md. A merged PR asserting a fix it didn't make seemed worse than three lines of extra scope here.
  • CLAUDE.md's binaries content was deduplicated. The merge left three same-named sections and three enumerations, one heading naming 2 of the 5 binaries that exist.

Two more commits since the review

7ca364bd — three drift classes the sweep could not see. The substitutions all matched authbridge/ with a trailing slash, so every spelling without one survived. Swept by shape: 1,283 raw mentions → 376 reading as a path segment → 27 with a slash (already caught) + 16 as a bare directory argument. Nine were bare cd authbridge lines whose blocks then run pip install -r requirements.txt or kubectl apply -f demos/..., so those procedures failed at step 1; they now say # from the repo root, since there is no directory to enter and the cwd is a precondition rather than a command. Also five links whose text called docs/architecture.md a "README", and security-scans.yaml's dead Bandit guard (for dir in . over a path that always exists, so neither it nor the [ -z "$PYTHON_DIRS" ] check below could branch).

9c1f0c3a — root-file cleanup. The flatten traded one deep level for a wide root, so this trims it without adding directories or renaming anything: uv.lock deleted (locked zero packages and declared a Python floor contradicting pyproject.toml), install-demo.sh deleted (a shim for a pre-rename name, guarding a URL this PR makes 404 anyway by removing authbridge/, with no references on public GitHub), pyrightconfig.json folded into pyproject.toml as [tool.pyright], and the two dev scripts moved into scripts/ alongside the tooling already there.

The script move was the only real risk and it was live: local-build-and-test.sh used SCRIPT_DIR as both the ROSSOCTL_DIR default base and the cd target for three Docker build contexts plus proxy-init. One level deeper would have broken all four silently — the text stays valid-looking while the depth changes. Now anchored on REPO_ROOT, verified to resolve to the directory holding go.work, with all eleven reference sites updated.

Deferred, not fixed

From @esnible's review: install.sh:489's [ -s "${boot}" ] guard still has no test — mutation m5 survives all 113 cases. Making the curl stub truncate on a non-200 (his suggestion, applied) makes the stub faithful to real curl -o but does not close that gap, because no scenario produces a 200 with an empty body. Pre-existing and untouched here.

Recorded for triage rather than silently dropped: make fmt's --exclude tests scope not matching the pre-commit hook's root-anchored one; stale "authbridge is the root" comments in two demo Makefiles; a stale plugins/opa/… test-path citation; partially disjoint port tables; and an unreconciled ConfigMap naming pair (authbridge-config-<agent> vs authbridge-runtime-config, both real in-tree, never related to each other).

From the last review round, also deferred rather than fixed here: install.sh:489's [ -s "${boot}"] guard has no test — an HTTP 200 with an empty body would run an empty script and exit 0 — which is pre-existing and untouched by this PR; and eight docs cite cmd/authbridge/, a directory that has never existed in either layout.

Rollback

A pure rename: git revert the merge commit restores everything, and consumers are pinned so they're unaffected either way. The one hazard is cutting a release inside the window — a tag between flatten and revert would publish, then unpublish, a module path. So: don't tag until this has settled.

Design spec: docs/superpowers/specs/2026-09-24-flatten-authbridge-design.md
Implementation plan: docs/superpowers/plans/2026-09-24-flatten-authbridge.md

Assisted-By: Claude (Anthropic AI) [email protected]

`authbridge/` holds 1,005 of 1,061 tracked files and separates nothing from
nothing — it dates from when this repo was kagenti-extensions and held more than
one extension. The level shows up in the public install URL, in all 12 Go module
paths, and in 36 workflow references plus 6 dependabot module directories.

Design decisions, settled before writing: structural only (no package or binary
renamed), a forwarding shim at the old install path, a flat docs/ union, and the
README/CLAUDE collisions resolved inside the sweep in separate commits. One
constraint is load-bearing: the installer may change its published one-liner but
may not break any existing invocation.

Three findings the design turns on, each verified against the tree rather than
assumed:

- The `replace` directives, `go.work` use list, and Dockerfile COPY paths all
  survive untouched, because the subtree moves up together and those paths are
  relative to it.
- The import rewrite is a safe one-segment prefix strip: imports read
  `cortex/authbridge/`, the install URL reads `cortex/main/authbridge/`, so a
  substitution on the former cannot touch the latter.
- Four images build from `context: ./authbridge` today, which excludes the repo
  root. After the flatten they build from `context: .`, and there is no root
  .dockerignore — so Docker would ship .git (196MB) and .worktrees (861MB on a
  dev machine) to the daemon on every build. A root .dockerignore is therefore
  part of the change, not a follow-up.

Self-review added two things I had missed. The flatten has to land LAST: all
three open PRs from the same audit (rossoctl#1124, rossoctl#1125, rossoctl#1126) touch files it moves,
and a 1,005-file rename against an open PR produces conflicts not worth
resolving by hand. And install-demo.sh needs no shim of its own — its old URL has
zero references in-repo and zero across public GitHub, and it is already a shim
for an older name.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
Review pushed back on the forwarding shim, and the pushback was right. Two of
the three justifications did not survive checking.

The `--ref=` machinery never needed it. install.sh fetches another ref's copy of
itself, and that copy lives in that ref's own tree — moving the file on main
cannot change what a tag contains. Every existing release keeps working
regardless. What `--ref` needs is a two-path lookup in the NEW installer so refs
from both eras resolve, which is a separate mechanism I had conflated with the
shim.

"14 external references" was misleading as I first reported it. Every reference
to main/authbridge/install.sh across public GitHub is inside the rossoctl org:
8 in this repo, 2 in rossoctl/rossoctl's current docs (coordinated PR), and 3 in
rossoctl/.github's versioned_docs for 0.7 and 0.8. No third parties at all.

So the shim protected exactly one case: a reader following archived v0.7/v0.8
docs. That is now accepted rather than mitigated, and the failure mode is stated
from measurement instead of guesswork — curl exits 56 with 49 bytes on stderr,
then sh reads empty stdin and exits 0, so an interactive user sees the 404 but a
scripted caller sees success having installed nothing.

Accepting it beats the alternative: a permanent file at authbridge/install.sh
re-creates the directory this change exists to delete, and there is no
falsifiable condition for ever removing it, because raw.githubusercontent.com
exposes no fetch telemetry. That is the same unfalsifiable-criterion trap already
sitting in install-demo.sh's comment.

Consequence worth noting in the target layout: no authbridge/ directory survives
at all now.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
Six tasks. Task 1 changes install.sh's --ref lookup before the move, because it
is correct either way and is the only genuinely test-first piece. Task 2 is the
mechanical sweep, driven by a committed script so a 1,005-file rename is reviewed
by re-running it. Tasks 3 and 4 resolve the README and CLAUDE.md collisions as
prose. Task 5 publishes the new URL and regenerates the demo asset. Task 6
retires the script.

Writing the plan surfaced two things the spec had missed, both now in the spec as
well:

Seven fixed-depth upward paths break and no substitution can see them, because
they climb OUT of the moving subtree rather than within it — readme-demo's
generator output path and staleness assertion, plus five in the github-issue demo
Makefiles. Each loses exactly one '../'. The readme-demo pair is the dangerous
one: unfixed, the generator writes above the repository root.

The demo SVG cannot be regenerated later. CI's readme-demo job regenerates it and
compares against the committed asset, and the asset renders the install
one-liner — so changing the one-liner fails that job until the asset follows in
the same change.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
The Task 2 sweep would have rewritten install.sh's --ref fallback URL. That
fallback deliberately PROBES the old location, so the substitution would make
both lookup paths identical and silently break --ref for every pre-flatten tag —
no error, just a quiet degrade to main's script. install.sh is now excluded from
that rule and its two usage comments are hand-edited instead.

Task 5 Step 1 also duplicated work the sweep already does across four files. It
is now a verification step, so an implementer does not read a no-op diff as a
failure.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
install.sh fetches another ref's copy of itself to honour --ref=, at a path that
is about to change. Try ${ref}/install.sh first and fall back to
${ref}/authbridge/install.sh on a clean 404 only, so refs from either side of
the flatten resolve and a pinned pre-flatten tag keeps running its own script
instead of silently degrading to main's.

Correct before the move as well as after: the new path simply 404s today and the
fallback finds the current one, which is why this lands first and separately.

A transport failure still dies rather than falling back, the distinction the
existing code is careful about, preserved here.

Test harness (install_test.sh): with_bootstrap now takes a second HTTP code for
the legacy path (http_new, http_legacy), since testing a two-path lookup needs
per-URL codes. Updated all 8 existing call sites for the new signature, 2 more
than the originating plan called out: the local-file cases used the same old
4-positional form and would otherwise silently misalign. Added 3 checks: the
brief's two new-path/legacy-path cases (corrected their expected output to
REEXECED, since any 200 exits the extracted bootstrap block before it could
print script=/version=, exactly like the pre-existing 200 check already relies
on), plus one covering the transport-error-never-falls-back safety property
that the brief's two cases do not actually exercise against the prior
single-fetch code.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
Task 1's review found a fourth legacy path reference in install.sh that the plan
accounted for nowhere: an advisory URL inside the abctl service version-mismatch
die, interpolating a tag as ${REPO}/${version}/authbridge/install.sh. Correct
for a pre-flatten tag, a 404 for a post-flatten one, and unable to do a two-path
lookup because it is printed advice rather than a fetch.

Not a Task 1 defect — untouched by that diff and outside its scope — so it is
routed to Task 5, where install.sh's other user-facing strings are hand-edited.

The fix deletes the URL guess rather than repairing it. Task 1 made --ref=
resolve either layout, so the advice can delegate to that mechanism: --ref=${version}
is correct in both eras with no version boundary to encode, and stays correct if
the layout changes again.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
rossoctl#1124 deleted a package and nine symbols, so the import-rewrite surface shrank:
460 Go files / 1,019 occurrences became 423 / 909. File count moved 1,005 -> 1,006
(this plan and its spec are themselves under authbridge/docs/ and move with it).

The sweep is count-independent, so nothing about the mechanism changes — but a
brief carrying numbers that do not match the tree invites an implementer to
assume something else is wrong too.

Also re-verified on the rebased tree, unchanged: 12 go.mod files, 36 workflow
references, 6 dependabot module directories, and all seven fixed-depth upward
paths. One earlier grep of mine reported readme-demo/main.go clean; that was a
bad pattern (filepath.Join uses separate quoted segments, not a slash path), not
a changed file.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
authbridge/ held 1,006 of 1,061 tracked files and separated nothing from
nothing: it dates from when this repo was kagenti-extensions and held more than
one extension. The level was carried by the public install URL, all 12 Go module
paths, 36 workflow references and 6 dependabot module directories.

Driven by scripts/flatten-authbridge.sh, committed here so review is re-run it
and diff rather than reading 1,006 renames. Run with BSD sed (/usr/bin/sed, the
`sed -i ''` spelling) because the script runs under /bin/sh, where sed is
/usr/bin/sed even on a machine whose interactive shell aliases sed to gsed.

Three things needed no edit, because the subtree moved together and they point
within it: the replace directives' relative paths, go.work's use list, and the
Dockerfile COPY paths. Verified rather than assumed — a podman build of
cmd/authbridge-proxy/Dockerfile with context: . succeeds and the image runs.

Seven fixed-depth paths did need an edit, because they climb OUT of the subtree
and no substitution on 'authbridge/' can see them. Each lost one '../':

  scripts/readme-demo/main.go:22          generator output path
  scripts/readme-demo/staleness_test.go   the staleness assertion
  demos/github-issue/rbac/Makefile:59     AGENT_EXAMPLES_DIR (5 -> 4)
  demos/github-issue/rbac/Makefile:63     VENV (4 -> 3)
  demos/github-issue/aiac/Makefile:43     VENV (4 -> 3)
  scripts/profile-tags/guards_test.go:15  repoRoot (3 -> 2)
  install_test.sh:513                     WORKFLOW (drops the /..)

The last two are not in the plan's list and were found by running the gates.
Both failed loudly, which is the only reason they are here: guards_test.go's
repoRoot walked one level too high and scanned a SIBLING WORKTREE, reporting
retired plugin tags from another branch; install_test.sh's WORKFLOW pointed
above the repo root, so the release-binaries.yaml assertions silently took
their "missing" branch.

Conversely, two paths the plan lists as needing an edit must NOT be edited:
the '-r ../../../requirements.txt' hints in both github-issue Makefiles.
requirements.txt moved from authbridge/ to the root at the same time those
Makefiles moved up, so the relative distance is unchanged; the suggested
'../../requirements.txt' would name demos/requirements.txt, which does not
exist. Verified by resolving every one of the nine candidates on disk.

Beyond the mechanical sweep, these break on the move and the script's patterns
cannot see them (no trailing slash, or a file type outside its glob list):

  .gitignore            not in the script's glob list at all. The root-level
                        binary spellings needed a LEADING SLASH, not just the
                        segment dropped: a bare `abctl` has no separator, so
                        git would match it at any depth, including the package
                        directory cmd/abctl. Without this, `git add -A` stages
                        66MB of built binaries -- it did, once, here.
  .github/CODEOWNERS    `authbridge/ @maintainers` matched nothing; `*` covers
                        it now, so the redundant rule is gone.
  ci.yaml               `find authbridge -name go.mod` -> `find .`; otherwise
                        the tidy gate finds zero modules and exits 1.
  dependabot-tidy.yml   same find, plus the `authbridge/**/go.{mod,sum}` path
                        filters, which would never again trigger the workflow.
  security-scans.yaml   Bandit's `for dir in authbridge tests`, and Trivy's
                        skip-dirs: 'authbridge/demos' (no trailing slash, so
                        the demos/ rule missed it).
  .pre-commit-config    `files: ^authbridge/` would have silenced ruff
                        entirely. Inverted to `exclude: ^tests/` rather than
                        dropped, because the root tests/ tree was never in
                        scope and does not lint or format clean; dropping the
                        filter fails the hook on pre-existing findings. The
                        Makefile's ruff target now matches that scope.
  local-build-and-test  three `cd "${SCRIPT_DIR}/authbridge"`.
  install_test.sh       the fake-curl stub at line 321 deliberately keys on
                        the LEGACY '*/authbridge/install.sh' to test the --ref
                        fallback. The sweep rewrote it to '*/install.sh',
                        which matches both URLs, so the stub answered every
                        fetch with the legacy status and two --ref tests
                        broke. Restored, with its two explanatory comments.
                        install.sh is excluded by the script; its test needs
                        the same exemption and did not have it.

Go comments and strings naming docs/ and scripts/ paths were swept too: the
script's step 3 only rewrites module paths, so 'authbridge/docs/...' in a
comment survived it. cmd/ was deliberately left out of that pass, which is
what keeps cmd/abctl/tui/sessions_title_test.go's synthetic session titles
intact -- their length is load-bearing for a documented 119-column assertion.

The import rewrite is a one-segment prefix strip and cannot touch the install
URL: imports read cortex/authbridge/, the URL reads cortex/main/authbridge/.
install.sh is byte-identical to before; its --ref probe of the old path at
line 485 is untouched.

Adds a root .dockerignore, which is now load-bearing rather than hygiene. Four
images moved from context: ./authbridge to context: ., so .git (196MB) and
.worktrees (861MB on a dev machine) went from outside every build context to
inside one. Measured context after it: 32.8MB.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
Task 2's verification list omitted pytest, and ci.yaml:281 runs it. That is
exactly how a dead parents[1]/"authbridge" path in tests/test_keycloak_sync.py
survived the sweep: *.py was in neither the substitution globs nor the gates. The
step now runs it, with a comment saying why it is easy to forget in a repo that
is 95% Go.

Task 3 gains a step for the eleven links the sweep retargeted from
authbridge/README.md to the root README.md — two different documents, with three
anchors that exist only in the former. Task 2's fix round restores them; Task 3
now points them at docs/architecture.md once the file lands there, so each commit
is correct on its own rather than one carrying a link that only becomes right
later.

Task 3's link check also grew from five named files to every tracked .md. Naming
five was how eleven broken links in other files went unnoticed.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
Review round 1 on the flatten sweep. Four gaps, none of them disputes.

1. tests/test_keycloak_sync.py loaded keycloak_sync.py through the old path
   (parents[1] / "authbridge" / "keycloak_sync.py"). That module is now at the
   repo root, so exec_module raised FileNotFoundError at import and
   `pytest tests/ -v -x --ignore=tests/e2e` died at collection — ci.yaml's
   python-test job, red. The sweep fixed the docstring on line 1 and missed the
   real path two lines below because *.py is not in its glob list, and the
   plan's verification never ran pytest. Now 12 passed.

2. Four more fixed-depth upward paths, same class as the seven already fixed and
   found the same way: the target did NOT move with the file, so each loses one
   '../'. Two of them hid from the first audit's regex — one is a path inside a
   Python snippet, the other a reference-style link definition:

     scripts/readme-demo/README.md:42                 3 -> 2  (docs/assets/)
     proxy-init/README.md:189                         2 -> 1  (.github/)
     demos/session-budget/hitl-with-claude-code.md:14 3 -> 2  (root README)
     docs/laptop-token-savings.md:8                   2 -> 1  (root README)

3. Ten links silently retargeted to the wrong document. These are relative
   links whose TEXT never changed: they climbed to authbridge/ and resolved to
   authbridge/README.md, and now climb to the repo root and resolve to the root
   README — a different document (87-line product page vs 532 lines of
   Kubernetes architecture). Three anchors (#download-prebuilt-binaries,
   #deployment-modes, #build-tag-plugin-selection) exist only in the former, so
   those were dead. Restored to authbridge/README.md, which is correct AS OF
   THIS COMMIT; Task 3 moves that file and retargets all of them. Pointing them
   at docs/architecture.md here would be a link that only becomes right later.

   This class was invisible to the first audit because the diff shows no change
   on these lines — nothing was rewritten, the meaning moved underneath them.
   A resolver over every relative reference in markdown now reports zero broken
   links and exactly three that legitimately mean the root product page.
   cmd/README.md:40 and docs/kubernetes.md:48 keep their ../CLAUDE.md retargets,
   which are pre-emptively correct given Task 4.

4. .dockerignore was kept verbatim from the plan; that was the wrong call. Its
   patterns are context-root-anchored — Docker matches the whole relative path,
   the opposite of .gitignore's match-at-any-depth — so `venv`, `__pycache__`,
   `.ruff_cache` and `*.test` only ever caught root-level hits and sailed past
   tests/__pycache__. Those are now `**/`-prefixed. Also adds .superpowers
   (1.2MB) and the compiled Go binaries, which .gitignore covers and Docker
   cannot read: on a machine that has run `go build` they are ~95MB of stale
   artifacts shipped into a context whose builder recompiles from source anyway.

   Measured on this tree with the binaries present: 111.5MB before, 12.0MB
   after. That also corrects the 32.8MB reported for the previous commit, which
   was itself inflated by a 20MB scripts/readme-demo/readme-demo the old
   patterns did not catch.

   `cmd/*/authbridge-*` catches the in-package binaries without touching the
   package directories (one segment shorter) or any source file — no tracked
   file under cmd/*/ begins with "authbridge-". Verified by rebuilding the
   image: the COPY of cmd/authbridge-proxy/entrypoint.sh still resolves.

Gates: pytest 12 passed; install_test.sh 113 passed 0 failed; podman build of
cmd/authbridge-proxy/Dockerfile succeeds and the image reports its version; all
12 modules tidy/build/vet clean; profile-tags guards ok; shellcheck clean at
error severity across all 48 scripts.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
Flattening authbridge/ collides its README.md with the repo's. They are not the
same kind of document: the root one is the 87-line product front page, this is
532 lines of Kubernetes deployment architecture. The front page keeps the slot
and the deep dive becomes docs/architecture.md, indexed from docs/README.md and
linked from docs/kubernetes.md -- the 59-line orientation page it complements.

Retargeted every inbound link that pointed at authbridge/README.md (root
README, SECURITY.md, cmd/abctl/README.md, authlib/plugins/README.md, and five
demo docs), preserving the three anchors specific to this document
(#download-prebuilt-binaries, #deployment-modes, #build-tag-plugin-selection).

Also fixed the document's own outbound links: they still assumed authbridge/'s
pre-flatten layout (authlib/, cmd/, demos/, docs/ as siblings under authbridge/)
even though Task 2 already moved those out to the repo root. docs/ and
authbridge/ are both root-level, so moving the file to docs/ changes what its
"./" and bare relative links resolve to; fixed by walking every link in the
file and resolving it on disk rather than trusting the text.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
The resolver I wrote tested the whole captured link target, including any
#anchor suffix. A link like ](../README.md#quick-start) names a real file, so
test -e on the full string reports it broken. Task 3's implementer found it
emitting ~68 BROKEN lines on an unchanged tree, before and after its work.

That is worse than having no check. A gate that always fails is a gate people
learn to skip, and it would have masked the real breakage it exists to catch —
in a task whose whole lesson was that link damage leaves nothing in the diff to
see, so resolution is the only thing that finds it.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
…the root

Nine sections of the nested file have no root counterpart at all: Component
Details, Session Events API, the top-level mtls: block, Common Tasks for Code
Changes, Shared Volume Contract, Config Hot-Reload, Keycloak Setup Scripts,
Important Port Mapping and What AuthBridge Does. Inserted them into the root
file in place; no root content changes here.

Paths rewritten for the flattened tree as they landed: proxy-init/init-iptables.sh
rather than a bare init-iptables.sh, demos/mtls/ rather than authbridge/demos/mtls/,
and the podman build examples no longer cd into authbridge/ first. The
/v1/sessions/{id} row's cross-reference to "gotcha 11" became a pointer to the
section, since the merged gotcha list renumbers.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
Six sections existed in both files. Resolved each rather than appending, and
checked every disputed claim against the tree instead of trusting either prose:

- Directory tree: the root's was still rooted at authbridge/, describing a
  subdirectory that no longer exists. Replaced with the flattened layout, keeping
  the nested file's per-directory detail and the root-only entries (tests/,
  .github/, go.work, install.sh).
- Binaries: kept the root's five-row table, added the nested file's opt-in plugin
  mechanics, the context-guru note, the Release binaries variants table, and
  links to cmd/README.md, cmd/abctl/README.md and authlib/README.md. go.work is
  at the root now, not authbridge/go.work.
- Gotchas: merged to 14 items. The two pairs that overlapped (outbound
  passthrough, route host patterns) kept the nested file's fuller version with
  the root's wording folded in.
- Build: the podman examples no longer cd into authbridge/ — the build context is
  the repo root. Added kind load / make load-image and the advanced verify script.
  Corrected the nested file's `make load-images`, which does not exist; the
  proxy-init target is `load-image`.
- Code conventions: kept the root's gating breakdown, which the tree confirms
  (ci.yaml's authlib job does run go fmt and go vet, and vet gates 7 of 12
  modules). Added slog / go-control-plane / jwx conventions. Corrected both files
  on shell strict mode: init-iptables.sh is `set -e`, not `set -euo pipefail`.
  Dropped the nested file's UID/GID 1000 bullet — it exists to match a
  client-registration container that no longer exists.
- ConfigMaps: added the authbridge-runtime-config row and the routes.yaml format
  block; dropped the pointer to authbridge/CLAUDE.md.

Also trimmed the duplicate shared-volume list under Cross-Component
Relationships to a pointer, and corrected the pre-commit ruff hook description,
which still claimed a `files: ^authbridge/` filter the config no longer has.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
The nested file's content now lives in the root CLAUDE.md. Deleting it removes
the last file under authbridge/, so the directory is gone.

Four places still pointed at the deleted path and are retargeted at the root
file: the mtls comment in cmd/authbridge-proxy/main.go, the trust-model comment
in authlib/listener/reverseproxy/transparent_inbound_mtls_test.go, and
demos/mtls/README.md; install.sh's local.go comment loses the stale segment too.
README.md's "Code lives under authbridge/" link would have 404'd once the
directory went away, so it now points at authlib/ and cmd/.

The docs/superpowers/ archive keeps its authbridge/ strings — dated records, and
still written to. install.sh keeps the legacy raw.githubusercontent URL under
main/authbridge/install.sh, which is the pre-flatten bootstrap path old one-liners
still fetch.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
PR rossoctl#1125's body claimed it added the demos missing from demos/README.md. It fixed
CLAUDE.md's list and left the index alone, so context-guru, echo and mtls are
still absent — the same three the original audit named.

Task 4's implementer surfaced it while checking whether the nested CLAUDE.md's
Demo Scenarios section was a true duplicate. It was not: the root file's coverage
plus demos/README.md does not span all twelve, which is exactly why that section
looked redundant and was not.

Folded into Task 5 rather than a fourth PR for three lines. A merged PR asserting
a fix it did not make is the worse problem.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
Task 4's review graded these Minor, and minors normally skip the fix loop. These
two go in anyway because they regress Task 4's own constraint — "one binaries
list" — rather than merely inheriting clutter: the merge added a third binaries
enumeration, and one of the three headings names 2 of the 5 binaries that now
exist.

CLAUDE.md is re-read at the start of every session, so redundancy there is a
recurring cost rather than a one-off blemish. Folded into Task 5, which is already
editing docs, instead of spending a dedicated fix round.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
The canonical one-liner becomes
raw.githubusercontent.com/rossoctl/cortex/main/install.sh. The old path is
abandoned rather than shimmed: every reference to it across public GitHub is
inside the rossoctl org, so there are no third parties to protect, and a
permanent file at authbridge/install.sh would re-create the directory this
series exists to delete with no falsifiable condition for ever removing it.

Fixes install.sh's own header/--help usage lines to the new URL, and its
abctl-service version-mismatch advice to suggest --ref=<tag> (which now
resolves either layout) instead of guessing a path that is wrong for
post-flatten tags. Leaves the --ref fallback probe at line 485 untouched --
it exists to find installers in pre-flatten releases.

Regenerates docs/assets/cortex-demo.svg, which is required and not cosmetic:
the asset renders the one-liner, and CIs readme-demo job regenerates it and
compares, so a changed command fails that job until the asset follows.

Also replaces install-demo.sh's promise to disappear once the old URL stops
being fetched with a condition that can actually be checked, consolidates
CLAUDE.md's three duplicated AuthBridge Binaries sections into one
enumeration, and adds context-guru, echo and mtls to demos/README.md's
index (PR rossoctl#1125 claimed this fix but only applied it to CLAUDE.md).

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
It was committed so the 1,006-file rename could be reviewed by re-running it
rather than read line by line. That job is done, and a one-shot script that
rewrites module paths in a directory which no longer exists is only a hazard.

Marks the design spec implemented. The spec has itself moved to
docs/superpowers/specs/, by the change it describes.

Points cmd/authbridge-praxis's "paused, see above" cross-reference in
CLAUDE.md at cmd/README.md instead, since the section it used to point at is
now itself a forward-pointer to this table.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 1054 files, which is 954 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

Usage-priced reviews support at most 300 files.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 9c8a0518-b1a8-4a7f-b6c1-b1e7243ef3b7

📥 Commits

Reviewing files that changed from the base of the PR and between 4ef879c and 87e9c01.

⛔ Files ignored due to path filters (13)
  • authlib/go.sum is excluded by !**/*.sum
  • authlib/pricing/internal/gen/main.go is excluded by !**/gen/**
  • cmd/abctl/go.sum is excluded by !**/*.sum
  • cmd/authbridge-cpex/go.sum is excluded by !**/*.sum
  • cmd/authbridge-envoy/go.sum is excluded by !**/*.sum
  • cmd/authbridge-praxis/go.sum is excluded by !**/*.sum
  • cmd/authbridge-proxy/go.sum is excluded by !**/*.sum
  • docs/assets/cortex-demo.svg is excluded by !**/*.svg
  • docs/plugin-sequence.svg is excluded by !**/*.svg
  • go.work is excluded by !**/*.work
  • scripts/readme-demo/go.sum is excluded by !**/*.sum
  • storage/redis/go.sum is excluded by !**/*.sum
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1054)
  • .claude/skills/demo/SKILL.md
  • .dockerignore
  • .github/CODEOWNERS
  • .github/dependabot.yml
  • .github/workflows/build.yaml
  • .github/workflows/ci.yaml
  • .github/workflows/dependabot-tidy.yml
  • .github/workflows/release-binaries.yaml
  • .github/workflows/security-scans.yaml
  • .gitignore
  • .pre-commit-config.yaml
  • CLAUDE.md
  • CONTRIBUTING.md
  • Makefile
  • README.md
  • SECURITY.md
  • authbridge/CLAUDE.md
  • authbridge/cmd/authbridge-cpex/plugins_a2aparser.go
  • authbridge/cmd/authbridge-cpex/plugins_cpex.go
  • authbridge/cmd/authbridge-cpex/plugins_ibac.go
  • authbridge/cmd/authbridge-cpex/plugins_inferenceparser.go
  • authbridge/cmd/authbridge-cpex/plugins_jwtvalidation.go
  • authbridge/cmd/authbridge-cpex/plugins_mcpparser.go
  • authbridge/cmd/authbridge-cpex/plugins_tokenbroker.go
  • authbridge/cmd/authbridge-cpex/plugins_tokenexchange.go
  • authbridge/cmd/authbridge-envoy/plugins_a2aparser.go
  • authbridge/cmd/authbridge-envoy/plugins_ibac.go
  • authbridge/cmd/authbridge-envoy/plugins_inferenceparser.go
  • authbridge/cmd/authbridge-envoy/plugins_jwtvalidation.go
  • authbridge/cmd/authbridge-envoy/plugins_lineage.go
  • authbridge/cmd/authbridge-envoy/plugins_mcpparser.go
  • authbridge/cmd/authbridge-envoy/plugins_opa.go
  • authbridge/cmd/authbridge-envoy/plugins_tokenbroker.go
  • authbridge/cmd/authbridge-envoy/plugins_tokenexchange.go
  • authbridge/cmd/authbridge-envoy/plugins_toolprune.go
  • authbridge/cmd/authbridge-proxy/plugins_a2aparser.go
  • authbridge/cmd/authbridge-proxy/plugins_ibac.go
  • authbridge/cmd/authbridge-proxy/plugins_inferenceparser.go
  • authbridge/cmd/authbridge-proxy/plugins_jwtvalidation.go
  • authbridge/cmd/authbridge-proxy/plugins_lineage.go
  • authbridge/cmd/authbridge-proxy/plugins_litellm_budgettrack.go
  • authbridge/cmd/authbridge-proxy/plugins_mcpparser.go
  • authbridge/cmd/authbridge-proxy/plugins_opa.go
  • authbridge/cmd/authbridge-proxy/plugins_staticinject.go
  • authbridge/cmd/authbridge-proxy/plugins_tokenbroker.go
  • authbridge/cmd/authbridge-proxy/plugins_tokenexchange.go
  • authbridge/cmd/authbridge-proxy/plugins_toolprune.go
  • authbridge/demos/echo/go.mod
  • authbridge/demos/finance-sparc/go.mod
  • authbridge/demos/ibac/go.mod
  • authbridge/install-demo.sh
  • authbridge/scripts/profile-tags/go.mod
  • authlib/README.md
  • authlib/auth/auth.go
  • authlib/auth/auth_test.go
  • authlib/auth/bearer.go
  • authlib/auth/result.go
  • authlib/bypass/matcher.go
  • authlib/bypass/matcher_test.go
  • authlib/clientstate/clientstate.go
  • authlib/clientstate/clientstate_test.go
  • authlib/config/config.go
  • authlib/config/config_test.go
  • authlib/config/cost_ledger_test.go
  • authlib/config/inbound_interception_test.go
  • authlib/config/loopback_bind_test.go
  • authlib/config/presets.go
  • authlib/config/pricing_test.go
  • authlib/config/resolve.go
  • authlib/config/session_limits_test.go
  • authlib/config/validate.go
  • authlib/config/warn.go
  • authlib/config/warn_test.go
  • authlib/contracts/content.go
  • authlib/contracts/identity.go
  • authlib/costevent/costevent.go
  • authlib/costevent/costevent_test.go
  • authlib/costevent/trust_test.go
  • authlib/costing/avoided.go
  • authlib/costing/bound_agreement_test.go
  • authlib/costing/cacheblind_test.go
  • authlib/costing/costing.go
  • authlib/costing/costing_test.go
  • authlib/costing/costing_tier_test.go
  • authlib/costing/decode.go
  • authlib/costing/implausible_test.go
  • authlib/costing/incomplete_test.go
  • authlib/costing/parallel_guard_test.go
  • authlib/costledger/admission_test.go
  • authlib/costledger/dst_test.go
  • authlib/costledger/durability_test.go
  • authlib/costledger/foreign_day_test.go
  • authlib/costledger/group_test.go
  • authlib/costledger/query.go
  • authlib/costledger/query_test.go
  • authlib/costledger/reprice.go
  • authlib/costledger/reprice_test.go
  • authlib/costledger/retention_cutoff_test.go
  • authlib/costledger/retention_month_test.go
  • authlib/costledger/row.go
  • authlib/costledger/store.go
  • authlib/costledger/tier_split_test.go
  • authlib/costledger/writer.go
  • authlib/costledger/writer_test.go
  • authlib/go.mod
  • authlib/internal/hostglob/hostglob.go
  • authlib/internal/hostglob/hostglob_test.go
  • authlib/listener/e2e/placeholder_e2e_test.go
  • authlib/listener/extproc/client_test.go
  • authlib/listener/extproc/httppath_test.go
  • authlib/listener/extproc/mcpreject_test.go
  • authlib/listener/extproc/placeholder_test.go
  • authlib/listener/extproc/server.go
  • authlib/listener/extproc/server_authority_test.go
  • authlib/listener/extproc/server_contentlength_test.go
  • authlib/listener/extproc/server_finalize_test.go
  • authlib/listener/extproc/server_headerdiff_test.go
  • authlib/listener/extproc/server_headeronly_test.go
  • authlib/listener/extproc/server_lifecycle_test.go
  • authlib/listener/extproc/server_midframe_test.go
  • authlib/listener/extproc/server_path_test.go
  • authlib/listener/extproc/server_rejectonce_test.go
  • authlib/listener/extproc/server_responsephase_test.go
  • authlib/listener/extproc/server_streamedbody_test.go
  • authlib/listener/extproc/server_teardown_test.go
  • authlib/listener/extproc/server_test.go
  • authlib/listener/extproc/skiphost_test.go
  • authlib/listener/forwardproxy/bridgehealth_test.go
  • authlib/listener/forwardproxy/client_test.go
  • authlib/listener/forwardproxy/fallback_finalize_test.go
  • authlib/listener/forwardproxy/gzip_sse_test.go
  • authlib/listener/forwardproxy/httppath_test.go
  • authlib/listener/forwardproxy/mcp_sse_repro_test.go
  • authlib/listener/forwardproxy/mcp_sse_stream_test.go
  • authlib/listener/forwardproxy/server.go
  • authlib/listener/forwardproxy/server_headerdiff_test.go
  • authlib/listener/forwardproxy/server_test.go
  • authlib/listener/forwardproxy/session_header_test.go
  • authlib/listener/forwardproxy/session_identity_test.go
  • authlib/listener/forwardproxy/session_pin_test.go
  • authlib/listener/forwardproxy/skiphost_test.go
  • authlib/listener/forwardproxy/sniff.go
  • authlib/listener/forwardproxy/sniff_test.go
  • authlib/listener/forwardproxy/streaming_direction_test.go
  • authlib/listener/forwardproxy/streaming_test.go
  • authlib/listener/forwardproxy/tlsbridge_integration_test.go
  • authlib/listener/forwardproxy/transparent.go
  • authlib/listener/forwardproxy/transparent_test.go
  • authlib/listener/forwardproxy/tunnelreason_integration_test.go
  • authlib/listener/forwardproxy/tunnelreason_test.go
  • authlib/listener/forwardproxy/writesse_test.go
  • authlib/listener/httpx/path.go
  • authlib/listener/httpx/path_test.go
  • authlib/listener/httpx/render.go
  • authlib/listener/httpx/render_test.go
  • authlib/listener/httpx/teardown.go
  • authlib/listener/httpx/teardown_test.go
  • authlib/listener/internal/bodyread/bodyread.go
  • authlib/listener/internal/bodyread/bodyread_test.go
  • authlib/listener/internal/sseframe/bom_test.go
  • authlib/listener/internal/sseframe/reader.go
  • authlib/listener/internal/sseframe/reader_test.go
  • authlib/listener/internal/tlssniff/listener.go
  • authlib/listener/internal/tlssniff/listener_test.go
  • authlib/listener/parity/cost_parity_test.go
  • authlib/listener/parity/dispatch_audit_test.go
  • authlib/listener/parity/drivers_test.go
  • authlib/listener/parity/parity_test.go
  • authlib/listener/parity/spy_test.go
  • authlib/listener/reverseproxy/client_test.go
  • authlib/listener/reverseproxy/costsettle_test.go
  • authlib/listener/reverseproxy/finalize_context_test.go
  • authlib/listener/reverseproxy/finisher_test.go
  • authlib/listener/reverseproxy/httppath_test.go
  • authlib/listener/reverseproxy/placeholder_test.go
  • authlib/listener/reverseproxy/recording_test.go
  • authlib/listener/reverseproxy/server.go
  • authlib/listener/reverseproxy/server_test.go
  • authlib/listener/reverseproxy/streaming_direction_test.go
  • authlib/listener/reverseproxy/streaming_test.go
  • authlib/listener/reverseproxy/transparent_inbound_mtls_test.go
  • authlib/listener/reverseproxy/transparent_inbound_test.go
  • authlib/listener/skiphost/globcontract_test.go
  • authlib/listener/skiphost/skiphost.go
  • authlib/listener/skiphost/skiphost_test.go
  • authlib/listener/transparentproxy/inbound.go
  • authlib/listener/transparentproxy/inbound_mtls_chain_test.go
  • authlib/listener/transparentproxy/inbound_test.go
  • authlib/listener/transparentproxy/origdst_linux.go
  • authlib/listener/transparentproxy/origdst_other.go
  • authlib/listener/transparentproxy/server.go
  • authlib/listener/transparentproxy/sockaddr.go
  • authlib/listener/transparentproxy/sockaddr_test.go
  • authlib/llmclient/README.md
  • authlib/llmclient/client.go
  • authlib/llmclient/client_test.go
  • authlib/llmclient/structured.go
  • authlib/observe/claude/harvest.go
  • authlib/observe/claude/harvest_test.go
  • authlib/observe/claude/lock_other.go
  • authlib/observe/claude/lock_unix.go
  • authlib/observe/claude/lock_unix_test.go
  • authlib/observe/claude/metadata.go
  • authlib/observe/statserver.go
  • authlib/observe/statserver_test.go
  • authlib/pipeline/README.md
  • authlib/pipeline/action.go
  • authlib/pipeline/action_test.go
  • authlib/pipeline/bodydirection_test.go
  • authlib/pipeline/bodymutation_test.go
  • authlib/pipeline/client.go
  • authlib/pipeline/client_test.go
  • authlib/pipeline/configurable.go
  • authlib/pipeline/configurable_test.go
  • authlib/pipeline/configured.go
  • authlib/pipeline/configured_test.go
  • authlib/pipeline/content.go
  • authlib/pipeline/content_test.go
  • authlib/pipeline/context.go
  • authlib/pipeline/errorkind_test.go
  • authlib/pipeline/extensions.go
  • authlib/pipeline/extensions_test.go
  • authlib/pipeline/finisher_test.go
  • authlib/pipeline/holder.go
  • authlib/pipeline/holder_test.go
  • authlib/pipeline/metrics.go
  • authlib/pipeline/outcome.go
  • authlib/pipeline/outcome_test.go
  • authlib/pipeline/pipeline.go
  • authlib/pipeline/pipeline_test.go
  • authlib/pipeline/plugin.go
  • authlib/pipeline/policy.go
  • authlib/pipeline/promptcontext.go
  • authlib/pipeline/promptcontext_fixtures_test.go
  • authlib/pipeline/promptcontext_test.go
  • authlib/pipeline/rawjson_test.go
  • authlib/pipeline/requestid.go
  • authlib/pipeline/requestid_unique_test.go
  • authlib/pipeline/schema.go
  • authlib/pipeline/schema_test.go
  • authlib/pipeline/session.go
  • authlib/pipeline/session_test.go
  • authlib/pipeline/sharedstore_test.go
  • authlib/pipeline/snapshot.go
  • authlib/pipeline/snapshot_test.go
  • authlib/pipeline/streaming_test.go
  • authlib/pipeline/tokens.go
  • authlib/placeholder/placeholder.go
  • authlib/placeholder/placeholder_test.go
  • authlib/plugins/README.md
  • authlib/plugins/a2aparser/plugin.go
  • authlib/plugins/a2aparser/plugin_test.go
  • authlib/plugins/a2aparser/streaming_test.go
  • authlib/plugins/contextguru/build_test.go
  • authlib/plugins/contextguru/plugin.go
  • authlib/plugins/contextguru/plugin_test.go
  • authlib/plugins/cpex/README.md
  • authlib/plugins/cpex/cmf_a2a.go
  • authlib/plugins/cpex/cmf_a2a_test.go
  • authlib/plugins/cpex/cmf_body.go
  • authlib/plugins/cpex/cmf_body_test.go
  • authlib/plugins/cpex/cmf_inference.go
  • authlib/plugins/cpex/cmf_inference_test.go
  • authlib/plugins/cpex/config.go
  • authlib/plugins/cpex/headers.go
  • authlib/plugins/cpex/headers_test.go
  • authlib/plugins/cpex/hooks.go
  • authlib/plugins/cpex/manager.go
  • authlib/plugins/cpex/manager_cpex.go
  • authlib/plugins/cpex/manager_stub.go
  • authlib/plugins/cpex/manager_test.go
  • authlib/plugins/cpex/plugin.go
  • authlib/plugins/cpex/plugin_test.go
  • authlib/plugins/deps.go
  • authlib/plugins/deps_test.go
  • authlib/plugins/ibac/judge.go
  • authlib/plugins/ibac/judge_test.go
  • authlib/plugins/ibac/plugin.go
  • authlib/plugins/ibac/plugin_test.go
  • authlib/plugins/inferenceparser/anthropic.go
  • authlib/plugins/inferenceparser/anthropic_test.go
  • authlib/plugins/inferenceparser/bodyless_cost_test.go
  • authlib/plugins/inferenceparser/cacheblind.go
  • authlib/plugins/inferenceparser/cacheblind_test.go
  • authlib/plugins/inferenceparser/cost.go
  • authlib/plugins/inferenceparser/events.go
  • authlib/plugins/inferenceparser/events_test.go
  • authlib/plugins/inferenceparser/implausible_cost_test.go
  • authlib/plugins/inferenceparser/incomplete_cost_test.go
  • authlib/plugins/inferenceparser/plugin.go
  • authlib/plugins/inferenceparser/plugin_test.go
  • authlib/plugins/inferenceparser/settle_state_test.go
  • authlib/plugins/inferenceparser/splittokens_test.go
  • authlib/plugins/inferenceparser/sse_shapes_test.go
  • authlib/plugins/inferenceparser/streaming_test.go
  • authlib/plugins/inferenceparser/subagent.go
  • authlib/plugins/inferenceparser/subagent_test.go
  • authlib/plugins/inferenceparser/unparsed_cost_test.go
  • authlib/plugins/injection_coverage_test.go
  • authlib/plugins/internal/parsercommon/kindbits_usage_test.go
  • authlib/plugins/internal/parsercommon/parsercommon.go
  • authlib/plugins/internal/parsercommon/tokenusage.go
  • authlib/plugins/internal/parsercommon/tokenusage_test.go
  • authlib/plugins/jwtvalidation/e2e_audiences_test.go
  • authlib/plugins/jwtvalidation/identity.go
  • authlib/plugins/jwtvalidation/identity_test.go
  • authlib/plugins/jwtvalidation/placeholder_test.go
  • authlib/plugins/jwtvalidation/plugin.go
  • authlib/plugins/jwtvalidation/plugin_test.go
  • authlib/plugins/jwtvalidation/validation/jwks.go
  • authlib/plugins/jwtvalidation/validation/jwks_test.go
  • authlib/plugins/jwtvalidation/validation/lazy.go
  • authlib/plugins/jwtvalidation/validation/verifier.go
  • authlib/plugins/lineage/config.go
  • authlib/plugins/lineage/plugin.go
  • authlib/plugins/lineage/plugin_test.go
  • authlib/plugins/litellm_budgettrack/drift.go
  • authlib/plugins/litellm_budgettrack/drift_test.go
  • authlib/plugins/litellm_budgettrack/forwardproxy_integration_test.go
  • authlib/plugins/litellm_budgettrack/plugin.go
  • authlib/plugins/litellm_budgettrack/plugin_test.go
  • authlib/plugins/litellm_budgettrack/settled_zero_test.go
  • authlib/plugins/litellm_budgettrack/sse_equivalence_test.go
  • authlib/plugins/litellm_budgettrack/streaming_integration_test.go
  • authlib/plugins/mcpparser/plugin.go
  • authlib/plugins/mcpparser/plugin_test.go
  • authlib/plugins/mcpparser/streaming_test.go
  • authlib/plugins/opa/README.md
  • authlib/plugins/opa/plugin.go
  • authlib/plugins/opa/plugin_test.go
  • authlib/plugins/opa/tool_parameters_rego_test.go
  • authlib/plugins/plugins_test.go
  • authlib/plugins/plugintesting/plugintesting.go
  • authlib/plugins/registry.go
  • authlib/plugins/registry_capsclone_test.go
  • authlib/plugins/registry_test.go
  • authlib/plugins/registry_testing.go
  • authlib/plugins/requireslater_test.go
  • authlib/plugins/sessionbudget/e2e_test.go
  • authlib/plugins/sessionbudget/lifecycle_test.go
  • authlib/plugins/sessionbudget/plugin.go
  • authlib/plugins/sessionbudget/plugin_test.go
  • authlib/plugins/sessionbudget/split_test.go
  • authlib/plugins/sparc/collect.go
  • authlib/plugins/sparc/plugin.go
  • authlib/plugins/sparc/plugin_test.go
  • authlib/plugins/sparc/reflector.go
  • authlib/plugins/sparc/reflector_test.go
  • authlib/plugins/sparc/respond.go
  • authlib/plugins/staticinject/plugin.go
  • authlib/plugins/staticinject/plugin_test.go
  • authlib/plugins/staticinject/resolver.go
  • authlib/plugins/staticinject/resolver_test.go
  • authlib/plugins/stats.go
  • authlib/plugins/tokenbroker/client/client.go
  • authlib/plugins/tokenbroker/client/client_acquire_test.go
  • authlib/plugins/tokenbroker/client/client_bench_test.go
  • authlib/plugins/tokenbroker/client/client_error_test.go
  • authlib/plugins/tokenbroker/client/client_network_test.go
  • authlib/plugins/tokenbroker/client/client_security_test.go
  • authlib/plugins/tokenbroker/client/client_testing.go
  • authlib/plugins/tokenbroker/client/error.go
  • authlib/plugins/tokenbroker/plugin.go
  • authlib/plugins/tokenbroker/plugin_configure_test.go
  • authlib/plugins/tokenbroker/plugin_edge_test.go
  • authlib/plugins/tokenbroker/plugin_request_test.go
  • authlib/plugins/tokenbroker/plugin_routing_test.go
  • authlib/plugins/tokenbroker/plugin_testing.go
  • authlib/plugins/tokenbroker/router_guard_test.go
  • authlib/plugins/tokenexchange/cache/cache.go
  • authlib/plugins/tokenexchange/cache/cache_test.go
  • authlib/plugins/tokenexchange/delegation_test.go
  • authlib/plugins/tokenexchange/exchange/auth.go
  • authlib/plugins/tokenexchange/exchange/client.go
  • authlib/plugins/tokenexchange/exchange/client_test.go
  • authlib/plugins/tokenexchange/exchange/errors.go
  • authlib/plugins/tokenexchange/placeholder_test.go
  • authlib/plugins/tokenexchange/plugin.go
  • authlib/plugins/tokenexchange/plugin_test.go
  • authlib/plugins/tokenexchange/provider.go
  • authlib/plugins/tokenexchange/provider_keycloak.go
  • authlib/plugins/tokenexchange/provider_test.go
  • authlib/plugins/toolprune/event.go
  • authlib/plugins/toolprune/metrics.go
  • authlib/plugins/toolprune/plugin.go
  • authlib/plugins/toolprune/plugin_test.go
  • authlib/praxis/policy.go
  • authlib/praxis/policy_test.go
  • authlib/praxis/praxis.go
  • authlib/praxis/praxis_test.go
  • authlib/praxis/render.go
  • authlib/pricing/bench_test.go
  • authlib/pricing/bundled.go
  • authlib/pricing/bundled_multipliers.go
  • authlib/pricing/bundled_test.go
  • authlib/pricing/config.go
  • authlib/pricing/config_test.go
  • authlib/pricing/consumer.go
  • authlib/pricing/cost.go
  • authlib/pricing/cost_test.go
  • authlib/pricing/cost_tier_test.go
  • authlib/pricing/describe.go
  • authlib/pricing/describe_test.go
  • authlib/pricing/estimate.go
  • authlib/pricing/estimate_test.go
  • authlib/pricing/handler.go
  • authlib/pricing/host.go
  • authlib/pricing/host_test.go
  • authlib/pricing/incompletereason_test.go
  • authlib/pricing/inference.go
  • authlib/pricing/inference_test.go
  • authlib/pricing/internal/pricegen/pricegen.go
  • authlib/pricing/multiplier.go
  • authlib/pricing/multiplier_test.go
  • authlib/pricing/plausible_test.go
  • authlib/pricing/provenance.go
  • authlib/pricing/provenance_ordering_test.go
  • authlib/pricing/rates.go
  • authlib/pricing/rates_test.go
  • authlib/pricing/refusal_class_test.go
  • authlib/pricing/registry.go
  • authlib/pricing/registry_test.go
  • authlib/pricing/resolution_regression_test.go
  • authlib/pricing/review_fixes_test.go
  • authlib/pricing/strict.go
  • authlib/pricing/strict_test.go
  • authlib/pricing/table.go
  • authlib/pricing/table_test.go
  • authlib/pricing/testdata/model_prices.snapshot.json
  • authlib/redact/redact.go
  • authlib/redact/redact_test.go
  • authlib/reloader/reloader.go
  • authlib/reloader/reloader_test.go
  • authlib/reloader/status.go
  • authlib/routing/config.go
  • authlib/routing/hostutil.go
  • authlib/routing/hostutil_test.go
  • authlib/routing/router.go
  • authlib/routing/router_test.go
  • authlib/runtimeutil/runtimeutil.go
  • authlib/runtimeutil/runtimeutil_test.go
  • authlib/session/idheader.go
  • authlib/session/idheader_test.go
  • authlib/session/intent_pin_test.go
  • authlib/session/intern.go
  • authlib/session/intern_test.go
  • authlib/session/no_expiry_test.go
  • authlib/session/recorder_test.go
  • authlib/session/retention_bench_test.go
  • authlib/session/store.go
  • authlib/session/store_test.go
  • authlib/session/viewpage_test.go
  • authlib/session/viewtail_test.go
  • authlib/sessionapi/before_test.go
  • authlib/sessionapi/catalog_adapter.go
  • authlib/sessionapi/dst_test.go
  • authlib/sessionapi/index_test.go
  • authlib/sessionapi/limit_test.go
  • authlib/sessionapi/metrics_test.go
  • authlib/sessionapi/retention_assembly_test.go
  • authlib/sessionapi/retention_coverage_test.go
  • authlib/sessionapi/server.go
  • authlib/sessionapi/server_test.go
  • authlib/sessionapi/snapshot.go
  • authlib/sessionapi/snapshot_bench_test.go
  • authlib/sessionapi/snapshot_test.go
  • authlib/sessionapi/summary.go
  • authlib/sessionapi/summary_http_test.go
  • authlib/sessionapi/summary_test.go
  • authlib/sessionapi/symbolic_window_error_test.go
  • authlib/sessionapi/usage.go
  • authlib/sessionapi/usage_group_test.go
  • authlib/sessionapi/usage_test.go
  • authlib/shared/store.go
  • authlib/shared/store_test.go
  • authlib/spiffe/consumer.go
  • authlib/spiffe/mirror.go
  • authlib/spiffe/mirror_test.go
  • authlib/spiffe/provider.go
  • authlib/spiffe/provider_integration_test.go
  • authlib/spiffe/provider_test.go
  • authlib/spiffe/source.go
  • authlib/spiffe/workload_jwt.go
  • authlib/spiffe/workload_jwt_test.go
  • authlib/spiffe/workload_x509.go
  • authlib/spiffe/workload_x509_test.go
  • authlib/storage/provider.go
  • authlib/storage/provider_test.go
  • authlib/storage/store.go
  • authlib/tls/client.go
  • authlib/tls/metrics.go
  • authlib/tls/server.go
  • authlib/tls/server_test.go
  • authlib/tls/spiffe.go
  • authlib/tls/testhelpers_test.go
  • authlib/tlsbridge/bundle.go
  • authlib/tlsbridge/bundle_sources_test.go
  • authlib/tlsbridge/bundle_test.go
  • authlib/tlsbridge/ca.go
  • authlib/tlsbridge/ca_test.go
  • authlib/tlsbridge/decision.go
  • authlib/tlsbridge/decision_test.go
  • authlib/tlsbridge/doc.go
  • authlib/tlsbridge/engine.go
  • authlib/tlsbridge/minter.go
  • authlib/tlsbridge/minter_test.go
  • authlib/tlsbridge/serve.go
  • authlib/tlsbridge/terminator.go
  • authlib/tlsbridge/terminator_test.go
  • authlib/tlsbridge/upstream.go
  • authlib/tlsbridge/upstream_test.go
  • authlib/usage/agent_test.go
  • authlib/usage/apportion.go
  • authlib/usage/apportion_test.go
  • authlib/usage/concurrent_test.go
  • authlib/usage/dst_test.go
  • authlib/usage/fold_test.go
  • authlib/usage/incomplete_test.go
  • authlib/usage/month_test.go
  • authlib/usage/pricing_test.go
  • authlib/usage/requestpair_test.go
  • authlib/usage/review_findings_test.go
  • authlib/usage/snapshot.go
  • authlib/usage/snapshot_test.go
  • authlib/usage/usage.go
  • authlib/usage/usage_test.go
  • authlib/usage/usage_tier_test.go
  • cmd/README.md
  • cmd/abctl/README.md
  • cmd/abctl/apiclient/client.go
  • cmd/abctl/apiclient/client_test.go
  • cmd/abctl/apiclient/metrics_decode_test.go
  • cmd/abctl/apiclient/snapshot.go
  • cmd/abctl/apiclient/snapshot_limit_test.go
  • cmd/abctl/apiclient/snapshot_test.go
  • cmd/abctl/apiclient/sse.go
  • cmd/abctl/apiclient/sse_test.go
  • cmd/abctl/apiclient/summary_test.go
  • cmd/abctl/budgets_test.go
  • cmd/abctl/cluster/cluster.go
  • cmd/abctl/cluster/cluster_test.go
  • cmd/abctl/cluster/e2e_test.go
  • cmd/abctl/cluster/portforward.go
  • cmd/abctl/cluster/portforward_test.go
  • cmd/abctl/cmd_claudecode.go
  • cmd/abctl/cmd_claudecode_test.go
  • cmd/abctl/cmd_config_migrate.go
  • cmd/abctl/cmd_config_migrate_test.go
  • cmd/abctl/cmd_config_migrate_zero_test.go
  • cmd/abctl/cmd_configure.go
  • cmd/abctl/cmd_configure_test.go
  • cmd/abctl/cmd_cost.go
  • cmd/abctl/cmd_cost_test.go
  • cmd/abctl/cmd_exec.go
  • cmd/abctl/cmd_exec_test.go
  • cmd/abctl/cmd_experimental.go
  • cmd/abctl/cmd_experimental_test.go
  • cmd/abctl/cmd_kubernetes_test.go
  • cmd/abctl/cmd_observe_test.go
  • cmd/abctl/cmd_pipeline.go
  • cmd/abctl/cmd_pipeline_test.go
  • cmd/abctl/cmd_pricing.go
  • cmd/abctl/cmd_pricing_test.go
  • cmd/abctl/cmd_service.go
  • cmd/abctl/cmd_service_bootout_test.go
  • cmd/abctl/cmd_service_durable_test.go
  • cmd/abctl/cmd_service_perm_test.go
  • cmd/abctl/cmd_service_platform.go
  • cmd/abctl/cmd_service_recovery_test.go
  • cmd/abctl/cmd_service_restricted_test.go
  • cmd/abctl/cmd_service_stamp_test.go
  • cmd/abctl/cmd_service_systemd_integration_test.go
  • cmd/abctl/cmd_service_systemd_test.go
  • cmd/abctl/cmd_service_test.go
  • cmd/abctl/cmd_tools.go
  • cmd/abctl/cmd_tools_test.go
  • cmd/abctl/cost_degraded_clauses_test.go
  • cmd/abctl/cost_token_split_test.go
  • cmd/abctl/edit/configmap.go
  • cmd/abctl/edit/configmap_test.go
  • cmd/abctl/edit/diff.go
  • cmd/abctl/edit/diff_test.go
  • cmd/abctl/edit/e2e_test.go
  • cmd/abctl/edit/edit.go
  • cmd/abctl/edit/edit_test.go
  • cmd/abctl/edit/local.go
  • cmd/abctl/edit/local_test.go
  • cmd/abctl/edit/status.go
  • cmd/abctl/edit/status_test.go
  • cmd/abctl/edit/store.go
  • cmd/abctl/edit/templates.go
  • cmd/abctl/edit/templates_test.go
  • cmd/abctl/edit/validate.go
  • cmd/abctl/edit/validate_test.go
  • cmd/abctl/go.mod
  • cmd/abctl/local_endpoint.go
  • cmd/abctl/local_endpoint_edit_test.go
  • cmd/abctl/local_endpoint_test.go
  • cmd/abctl/main.go
  • cmd/abctl/toolscan/known.go
  • cmd/abctl/toolscan/patch.go
  • cmd/abctl/toolscan/patch_test.go
  • cmd/abctl/toolscan/scan.go
  • cmd/abctl/toolscan/scan_test.go
  • cmd/abctl/tui/app.go
  • cmd/abctl/tui/catalog_pane.go
  • cmd/abctl/tui/catalog_pane_test.go
  • cmd/abctl/tui/cost_event.go
  • cmd/abctl/tui/cost_event_test.go
  • cmd/abctl/tui/coverage_test.go
  • cmd/abctl/tui/deps.go
  • cmd/abctl/tui/deps_test.go
  • cmd/abctl/tui/detail_fetch.go
  • cmd/abctl/tui/detail_fetch_test.go
  • cmd/abctl/tui/detail_pane.go
  • cmd/abctl/tui/detail_pane_test.go
  • cmd/abctl/tui/detail_reasoning_test.go
  • cmd/abctl/tui/divider.go
  • cmd/abctl/tui/divider_test.go
  • cmd/abctl/tui/e2e_test.go
  • cmd/abctl/tui/edit_e2e_test.go
  • cmd/abctl/tui/edit_overlay.go
  • cmd/abctl/tui/edit_overlay_test.go
  • cmd/abctl/tui/event_retention_test.go
  • cmd/abctl/tui/events_columns.go
  • cmd/abctl/tui/events_columns_test.go
  • cmd/abctl/tui/events_pane.go
  • cmd/abctl/tui/events_pane_test.go
  • cmd/abctl/tui/fit_strip_figures_test.go
  • cmd/abctl/tui/footer.go
  • cmd/abctl/tui/footer_fit_test.go
  • cmd/abctl/tui/footer_test.go
  • cmd/abctl/tui/header_align_test.go
  • cmd/abctl/tui/help_overlay.go
  • cmd/abctl/tui/help_overlay_test.go
  • cmd/abctl/tui/help_pane_map_test.go
  • cmd/abctl/tui/json_colorize.go
  • cmd/abctl/tui/keys.go
  • cmd/abctl/tui/layout_fit_test.go
  • cmd/abctl/tui/local_preview_test.go
  • cmd/abctl/tui/money_precision_test.go
  • cmd/abctl/tui/namespaces_pane.go
  • cmd/abctl/tui/older_notice_test.go
  • cmd/abctl/tui/open_at.go
  • cmd/abctl/tui/open_at_test.go
  • cmd/abctl/tui/paging.go
  • cmd/abctl/tui/paging_test.go
  • cmd/abctl/tui/picker_test.go
  • cmd/abctl/tui/pipeline_key_test.go
  • cmd/abctl/tui/pipeline_pane.go
  • cmd/abctl/tui/pipeline_pane_test.go
  • cmd/abctl/tui/plugin_detail_pane.go
  • cmd/abctl/tui/plugin_detail_pane_test.go
  • cmd/abctl/tui/plugin_metrics.go
  • cmd/abctl/tui/plugin_metrics_test.go
  • cmd/abctl/tui/pods_pane.go
  • cmd/abctl/tui/prune_saving.go
  • cmd/abctl/tui/prune_saving_test.go
  • cmd/abctl/tui/selected_highlight_test.go
  • cmd/abctl/tui/session_metadata.go
  • cmd/abctl/tui/sessions_context.go
  • cmd/abctl/tui/sessions_context_bench_test.go
  • cmd/abctl/tui/sessions_context_fold_test.go
  • cmd/abctl/tui/sessions_context_test.go
  • cmd/abctl/tui/sessions_context_wire_test.go
  • cmd/abctl/tui/sessions_money_test.go
  • cmd/abctl/tui/sessions_pane.go
  • cmd/abctl/tui/sessions_rowid_test.go
  • cmd/abctl/tui/sessions_title_test.go
  • cmd/abctl/tui/sessions_tokens_test.go
  • cmd/abctl/tui/settings.go
  • cmd/abctl/tui/settings_persist_test.go
  • cmd/abctl/tui/settings_test.go
  • cmd/abctl/tui/span_readings_test.go
  • cmd/abctl/tui/spend.go
  • cmd/abctl/tui/spend_band.go
  • cmd/abctl/tui/spend_band_test.go
  • cmd/abctl/tui/spend_drawer.go
  • cmd/abctl/tui/spend_drawer_test.go
  • cmd/abctl/tui/spend_sanitize_test.go
  • cmd/abctl/tui/spend_strip.go
  • cmd/abctl/tui/spend_strip_test.go
  • cmd/abctl/tui/spend_test.go
  • cmd/abctl/tui/spend_tiers.go
  • cmd/abctl/tui/spend_tiers_reasoning_test.go
  • cmd/abctl/tui/spend_tiers_test.go
  • cmd/abctl/tui/styles.go
  • cmd/abctl/tui/table_ansi_test.go
  • cmd/abctl/tui/table_cursor.go
  • cmd/abctl/tui/table_cursor_test.go
  • cmd/abctl/tui/table_width.go
  • cmd/abctl/tui/usage_glyphs.go
  • cmd/abctl/tui/usage_pane.go
  • cmd/abctl/tui/usage_pane_scope_test.go
  • cmd/abctl/tui/usage_render.go
  • cmd/abctl/tui/usage_render_test.go
  • cmd/abctl/tui/usage_stacked.go
  • cmd/abctl/tui/usage_stacked_test.go
  • cmd/abctl/tui/usage_state_test.go
  • cmd/abctl/tui/usage_whiskers.go
  • cmd/abctl/tui/usage_whiskers_test.go
  • cmd/abctl/tui/util.go
  • cmd/abctl/tui/util_test.go
  • cmd/abctl/tui/yank_test.go
  • cmd/abctl/userconfig.go
  • cmd/abctl/userconfig_e2e_test.go
  • cmd/abctl/userconfig_test.go
  • cmd/authbridge-cpex/CPEX_FFI_ABI
  • cmd/authbridge-cpex/CPEX_FFI_VERSION
  • cmd/authbridge-cpex/Dockerfile
  • cmd/authbridge-cpex/entrypoint.sh
  • cmd/authbridge-cpex/go.mod
  • cmd/authbridge-cpex/main.go
  • cmd/authbridge-cpex/main_test.go
  • cmd/authbridge-cpex/plugins_a2aparser.go
  • cmd/authbridge-cpex/plugins_cpex.go
  • cmd/authbridge-cpex/plugins_ibac.go
  • cmd/authbridge-cpex/plugins_inferenceparser.go
  • cmd/authbridge-cpex/plugins_jwtvalidation.go
  • cmd/authbridge-cpex/plugins_mcpparser.go
  • cmd/authbridge-cpex/plugins_sparcplugin.go
  • cmd/authbridge-cpex/plugins_tokenbroker.go
  • cmd/authbridge-cpex/plugins_tokenexchange.go
  • cmd/authbridge-envoy/Dockerfile
  • cmd/authbridge-envoy/entrypoint.sh
  • cmd/authbridge-envoy/go.mod
  • cmd/authbridge-envoy/main.go
  • cmd/authbridge-envoy/main_test.go
  • cmd/authbridge-envoy/plugins_a2aparser.go
  • cmd/authbridge-envoy/plugins_contextguru.go
  • cmd/authbridge-envoy/plugins_ibac.go
  • cmd/authbridge-envoy/plugins_inferenceparser.go
  • cmd/authbridge-envoy/plugins_jwtvalidation.go
  • cmd/authbridge-envoy/plugins_lineage.go
  • cmd/authbridge-envoy/plugins_mcpparser.go
  • cmd/authbridge-envoy/plugins_opa.go
  • cmd/authbridge-envoy/plugins_sessionbudget.go
  • cmd/authbridge-envoy/plugins_sparcplugin.go
  • cmd/authbridge-envoy/plugins_tokenbroker.go
  • cmd/authbridge-envoy/plugins_tokenexchange.go
  • cmd/authbridge-envoy/plugins_toolprune.go
  • cmd/authbridge-praxis/Dockerfile
  • cmd/authbridge-praxis/entrypoint.sh
  • cmd/authbridge-praxis/go.mod
  • cmd/authbridge-praxis/main.go
  • cmd/authbridge-proxy/Dockerfile
  • cmd/authbridge-proxy/entrypoint.sh
  • cmd/authbridge-proxy/go.mod
  • cmd/authbridge-proxy/local.go
  • cmd/authbridge-proxy/local_test.go
  • cmd/authbridge-proxy/main.go
  • cmd/authbridge-proxy/main_test.go
  • cmd/authbridge-proxy/plugins_a2aparser.go
  • cmd/authbridge-proxy/plugins_contextguru.go
  • cmd/authbridge-proxy/plugins_ibac.go
  • cmd/authbridge-proxy/plugins_inferenceparser.go
  • cmd/authbridge-proxy/plugins_jwtvalidation.go
  • cmd/authbridge-proxy/plugins_lineage.go
  • cmd/authbridge-proxy/plugins_litellm_budgettrack.go
  • cmd/authbridge-proxy/plugins_mcpparser.go
  • cmd/authbridge-proxy/plugins_opa.go
  • cmd/authbridge-proxy/plugins_sessionbudget.go
  • cmd/authbridge-proxy/plugins_sparcplugin.go
  • cmd/authbridge-proxy/plugins_staticinject.go
  • cmd/authbridge-proxy/plugins_tokenbroker.go
  • cmd/authbridge-proxy/plugins_tokenexchange.go
  • cmd/authbridge-proxy/plugins_toolprune.go
  • cmd/authbridge-proxy/supervise.go
  • demos/README.md
  • demos/context-guru/README.md
  • demos/context-guru/context-guru-tls-bridge.yaml
  • demos/context-guru/k8s/agent.yaml
  • demos/context-guru/k8s/authbridge-config.yaml
  • demos/context-guru/run.sh
  • demos/echo/.gitignore
  • demos/echo/Makefile
  • demos/echo/README.md
  • demos/echo/agent/Dockerfile
  • demos/echo/agent/main.go
  • demos/echo/go.mod
  • demos/echo/k8s/agent.yaml
  • demos/echo/k8s/echo-patch.yaml
  • demos/echo/k8s/upstream.yaml
  • demos/echo/scripts/echo-merge.py
  • demos/echo/scripts/patch-echo-config.sh
  • demos/echo/scripts/setup_keycloak.py
  • demos/echo/upstream/Dockerfile
  • demos/echo/upstream/main.go
  • demos/finance-sparc/.gitignore
  • demos/finance-sparc/Makefile
  • demos/finance-sparc/README.md
  • demos/finance-sparc/finance-agent/Dockerfile
  • demos/finance-sparc/finance-agent/main.go
  • demos/finance-sparc/finance-mcp/Dockerfile
  • demos/finance-sparc/finance-mcp/main.go
  • demos/finance-sparc/go.mod
  • demos/finance-sparc/k8s/agent.yaml
  • demos/finance-sparc/k8s/finance-mcp.yaml
  • demos/finance-sparc/k8s/ollama.yaml
  • demos/finance-sparc/k8s/sparc-patch.yaml
  • demos/finance-sparc/scripts/drive-demo.sh
  • demos/finance-sparc/scripts/host-setup.sh
  • demos/finance-sparc/scripts/launch-abctl.sh
  • demos/finance-sparc/scripts/patch-sparc-config.sh
  • demos/finance-sparc/scripts/pipeline-merge.py
  • demos/finance-sparc/scripts/setup_keycloak_finance.py
  • demos/finance-sparc/scripts/show-verdicts.py
  • demos/finance-sparc/scripts/stage-ollama-model.sh
  • demos/github-issue/aiac/.gitignore
  • demos/github-issue/aiac/Makefile
  • demos/github-issue/aiac/aiac.env.TEMPLATE
  • demos/github-issue/aiac/aiac_agent/__init__.py
  • demos/github-issue/aiac/aiac_agent/agent/__init__.py
  • demos/github-issue/aiac/aiac_agent/agent/graph.py
  • demos/github-issue/aiac/aiac_agent/agent/state.py
  • demos/github-issue/aiac/aiac_agent/config/__init__.py
  • demos/github-issue/aiac/aiac_agent/config/config_utils.py
  • demos/github-issue/aiac/aiac_agent/config/constants.py
  • demos/github-issue/aiac/aiac_agent/config/llm_conf.yaml.TEMPLATE
  • demos/github-issue/aiac/aiac_agent/config/llm_config.py
  • demos/github-issue/aiac/aiac_agent/prompts/__init__.py
  • demos/github-issue/aiac/aiac_agent/prompts/prompt_builder.py
  • demos/github-issue/aiac/aiac_agent/utils/__init__.py
  • demos/github-issue/aiac/aiac_agent/utils/parsers.py
  • demos/github-issue/aiac/aiac_agent/utils/validators.py
  • demos/github-issue/aiac/aiac_cli.py
  • demos/github-issue/aiac/keycloak_ops/__init__.py
  • demos/github-issue/aiac/keycloak_ops/apply_policy.py
  • demos/github-issue/aiac/keycloak_ops/delete_policy.py
  • demos/github-issue/aiac/keycloak_ops/export_config.py
  • demos/github-issue/aiac/policies/permissive_policy.txt
  • demos/github-issue/aiac/policies/regular_policy.txt
  • demos/github-issue/aiac/scripts/show-result.py
  • demos/github-issue/demo-aiac.md
  • demos/github-issue/demo-manual.md
  • demos/github-issue/demo-rbac.md
  • demos/github-issue/demo-ui.md
  • demos/github-issue/demo.md
  • demos/github-issue/k8s/configmaps.yaml
  • demos/github-issue/k8s/git-issue-agent-deployment.yaml
  • demos/github-issue/k8s/github-tool-deployment.yaml
  • demos/github-issue/rbac/Makefile
  • demos/github-issue/rbac/config.yaml
  • demos/github-issue/rbac/policy.yaml
  • demos/github-issue/setup_keycloak.py
  • demos/hr-cpex/Makefile
  • demos/hr-cpex/README.md
  • demos/hr-cpex/agent/CHAT-WALKTHROUGH.md
  • demos/hr-cpex/agent/Dockerfile
  • demos/hr-cpex/agent/agent.py
  • demos/hr-cpex/agent/chat.py
  • demos/hr-cpex/agent/requirements-client.txt
  • demos/hr-cpex/agent/requirements.txt
  • demos/hr-cpex/hr-mcp-server/Dockerfile
  • demos/hr-cpex/hr-mcp-server/requirements.txt
  • demos/hr-cpex/hr-mcp-server/server.py
  • demos/hr-cpex/k8s/00-namespace.yaml
  • demos/hr-cpex/k8s/10-keycloak.yaml
  • demos/hr-cpex/k8s/20-hr-mcp.yaml
  • demos/hr-cpex/k8s/30-agent.yaml
  • demos/hr-cpex/k8s/cpex-policy.yaml
  • demos/hr-cpex/k8s/realm-export.json
  • demos/hr-cpex/mint-token.sh
  • demos/hr-cpex/scenarios/01-bob-allow.sh
  • demos/hr-cpex/scenarios/02-alice-deny.sh
  • demos/hr-cpex/scenarios/03-eve-redact.sh
  • demos/hr-cpex/scenarios/04-alice-internal-allow.sh
  • demos/hr-cpex/scenarios/05-alice-external-cedar-deny.sh
  • demos/hr-cpex/scenarios/06-bob-apl-deny.sh
  • demos/hr-cpex/scenarios/07-bob-pii-deny.sh
  • demos/hr-cpex/scenarios/08-bob-taint-deny.sh
  • demos/hr-cpex/scenarios/09-cross-principal-taint-isolation.sh
  • demos/hr-cpex/scenarios/_lib.sh
  • demos/hr-cpex/verify-token-exchange.sh
  • demos/ibac/.gitignore
  • demos/ibac/Makefile
  • demos/ibac/README.md
  • demos/ibac/agent/Dockerfile
  • demos/ibac/agent/main.go
  • demos/ibac/email-server/Dockerfile
  • demos/ibac/email-server/main.go
  • demos/ibac/evil-server/Dockerfile
  • demos/ibac/evil-server/main.go
  • demos/ibac/go.mod
  • demos/ibac/k8s/agent.yaml
  • demos/ibac/k8s/email-server.yaml
  • demos/ibac/k8s/evil-server.yaml
  • demos/ibac/k8s/ibac-patch.yaml
  • demos/ibac/scripts/ibac-merge.py
  • demos/ibac/scripts/launch-abctl.sh
  • demos/ibac/scripts/patch-ibac-config.sh
  • demos/lineage/README.md
  • demos/lineage/ask.sh
  • demos/lineage/k8s/weather.yaml
  • demos/lineage/show-trace.py
  • demos/mcp-parser/README.md
  • demos/mtls/Makefile
  • demos/mtls/README.md
  • demos/mtls/k8s/authbridge-runtime-mtls.yaml
  • demos/mtls/k8s/callee-envoy.yaml
  • demos/mtls/k8s/callee.yaml
  • demos/mtls/k8s/caller-envoy.yaml
  • demos/mtls/k8s/caller.yaml
  • demos/mtls/k8s/envoy-config-mtls.yaml
  • demos/mtls/scripts/mtls-merge.py
  • demos/mtls/scripts/patch-mtls-config.sh
  • demos/mtls/scripts/swap-envoy-config.sh
  • demos/mtls/scripts/verify-encrypted-envoy.sh
  • demos/mtls/scripts/verify-encrypted.sh
  • demos/mtls/scripts/verify-permissive-envoy.sh
  • demos/mtls/scripts/verify-permissive.sh
  • demos/mtls/scripts/verify-strict-rejects-plain-envoy.sh
  • demos/mtls/scripts/verify-strict-rejects-plain.sh
  • demos/session-budget/README.md
  • demos/session-budget/hitl-local.md
  • demos/session-budget/hitl-with-claude-code.md
  • demos/session-budget/k8s/pause-webhook-stub.yaml
  • demos/session-budget/local/approver.go
  • demos/session-budget/local/config-https-observe.yaml
  • demos/session-budget/local/config-https.yaml
  • demos/session-budget/local/config.yaml
  • demos/token-exchange-routes/README.md
  • demos/token-exchange-routes/routes.yaml
  • demos/weather-agent/demo-ui-advanced.md
  • demos/weather-agent/demo-ui.md
  • demos/weather-agent/demo-with-abctl.md
  • demos/weather-agent/deploy_and_verify_advanced.sh
  • demos/weather-agent/k8s/agentruntime-weather-service-advanced.yaml
  • demos/weather-agent/k8s/agentruntime-weather-tool-advanced.yaml
  • demos/weather-agent/k8s/configmaps-advanced.yaml
  • demos/weather-agent/k8s/weather-service-advanced.yaml
  • demos/weather-agent/k8s/weather-tool-advanced.yaml
  • demos/weather-agent/setup_keycloak_weather_advanced.py
  • docs/README.md
  • docs/architecture.md
  • docs/cpex-plugin.md
  • docs/framework-architecture.md
  • docs/ibac-plugin.md
  • docs/idp-plugin-contract.md
  • docs/kubernetes.md
  • docs/laptop-service.md
  • docs/laptop-token-savings.md
  • docs/lineage-wire-contract.md
  • docs/litellm-budgettrack-plugin.md
  • docs/plugin-catalog.md
  • docs/plugin-reference.md
  • docs/plugin-tutorial.md
  • docs/proposals/authbridge-hooks.md
  • docs/proposals/cost-tier-breakdown.md
  • docs/proposals/tool-prune.md
  • docs/session-budget-plugin.md
  • docs/sparc-plugin.md
  • docs/superpowers/plans/2026-05-22-authbridge-go-spiffe-sdk.md
  • docs/superpowers/plans/2026-05-28-abctl-pipeline-edit.md
  • docs/superpowers/plans/2026-05-28-abctl-plugin-config.md
  • docs/superpowers/plans/2026-05-28-abctl-pod-picker.md
  • docs/superpowers/plans/2026-06-02-credential-placeholder-swap.md
  • docs/superpowers/plans/2026-06-17-authbridge-tlsbridge-phase1.md
  • docs/superpowers/plans/2026-09-09-main-channel.md
  • docs/superpowers/plans/2026-09-09-pricing-consolidation-core.md
  • docs/superpowers/plans/2026-09-09-pricing-consolidation-phase0.md
  • docs/superpowers/plans/2026-09-21-systemd-fake-harness.md
  • docs/superpowers/plans/2026-09-21-systemd-real-integration-test.md
  • docs/superpowers/plans/2026-09-22-readme-demo-animation.md
  • docs/superpowers/plans/2026-09-23-session-prompt-context.md
  • docs/superpowers/plans/2026-09-23-systemd-usable-preflight.md
  • docs/superpowers/plans/2026-09-24-flatten-authbridge.md
  • docs/superpowers/specs/2026-05-22-authbridge-go-spiffe-sdk-design.md
  • docs/superpowers/specs/2026-05-28-abctl-pipeline-edit-design.md
  • docs/superpowers/specs/2026-05-28-abctl-plugin-config-design.md
  • docs/superpowers/specs/2026-05-28-abctl-pod-picker-design.md
  • docs/superpowers/specs/2026-06-02-credential-placeholder-swap-design.md
  • docs/superpowers/specs/2026-06-12-authbridge-tlsbridge-design.md
  • docs/superpowers/specs/2026-09-09-main-channel-design.md
  • docs/superpowers/specs/2026-09-09-pricing-consolidation-design.md
  • docs/superpowers/specs/2026-09-16-linux-systemd-lifecycle-design.md
  • docs/superpowers/specs/2026-09-22-readme-demo-animation-design.md
  • docs/superpowers/specs/2026-09-23-session-prompt-context-design.md
  • docs/superpowers/specs/2026-09-24-flatten-authbridge-design.md
  • docs/token-broker-plugin.md
  • docs/tool-prune-plugin.md
  • install.sh
  • install_test.sh
  • keycloak_sync.py
  • lineage-attach/DESIGN.md
  • lineage-attach/Dockerfile.otel-shim
  • lineage-attach/README.md
  • lineage-attach/RECIPE.md
  • lineage-attach/attach-lineage.sh
  • lineage-attach/build-otel-shim.sh
  • lineage-attach/container-runtime.sh
  • lineage-attach/lineage-propagate-hook.py
  • lineage-attach/sidecar-patch.sh
  • proxy-init/Dockerfile.init
  • proxy-init/Makefile
  • proxy-init/README.md
  • proxy-init/init-iptables.sh
  • proxy-init/test-enforce-redirect.sh
  • pyproject.toml
  • pyrightconfig.json
  • requirements.txt
  • scripts/local-build-and-test.sh
  • scripts/profile-tags/discover.go
  • scripts/profile-tags/go.mod
  • scripts/profile-tags/guards_test.go
  • scripts/profile-tags/main.go
  • scripts/profile-tags/main_test.go
  • scripts/profile-tags/profiles.go
  • scripts/profile-tags/profiles_test.go
  • scripts/readme-demo/.gitignore
  • scripts/readme-demo/README.md
  • scripts/readme-demo/capture_test.go
  • scripts/readme-demo/demo.yaml
  • scripts/readme-demo/fixturedata.go
  • scripts/readme-demo/go.mod
  • scripts/readme-demo/main.go
  • scripts/readme-demo/script.go
  • scripts/readme-demo/script_test.go
  • scripts/readme-demo/sgr.go
  • scripts/readme-demo/sgr_test.go
  • scripts/readme-demo/shell.go
  • scripts/readme-demo/staleness_test.go
  • scripts/readme-demo/state.go
  • scripts/readme-demo/svg.go
  • scripts/readme-demo/svg_test.go
  • scripts/readme-demo/tuicapture.go
  • scripts/readme-demo/tuistates.go
  • scripts/verify-moved-ca-diagnostics.sh
  • scripts/verify-spire-keycloak.sh
  • sparc-service/.dockerignore
  • sparc-service/Dockerfile
  • sparc-service/README.md
  • sparc-service/deploy/Makefile
  • sparc-service/deploy/README.md
  • sparc-service/deploy/sparc-service.yaml
  • sparc-service/pyproject.toml
  • sparc-service/sparc_service/__init__.py
  • sparc-service/sparc_service/__main__.py
  • sparc-service/sparc_service/api.py
  • sparc-service/sparc_service/engine.py
  • sparc-service/sparc_service/models.py
  • sparc-service/sparc_service/providers.py
  • sparc-service/sparc_service/settings.py
  • sparc-service/tests/conftest.py
  • sparc-service/tests/test_api.py
  • sparc-service/tests/test_engine.py
  • sparc-service/tests/test_haiku_empty_response.py
  • sparc-service/tests/test_providers.py
  • sparc-service/tests/test_settings.py
  • sparc-service/tests/test_watsonx_integration.py
  • storage/redis/go.mod
  • storage/redis/redis.go
  • storage/redis/redis_test.go
  • tests/test_keycloak_sync.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

One Important finding plus several cheap minors the review offered to
batch:

- Four Dockerfile comments still named ./authbridge as the build
  context; the sweep's dollar-anchored rule matched build.yaml's YAML
  line but not these comments, which have trailing text. Point them
  at the repo root instead.
- Spec section 5 (and the plan's Task 2 Step 3) wrongly told the sweep
  to shorten the "-r ../../../requirements.txt" hints in the
  github-issue rbac/aiac Makefiles -- requirements.txt moved up with
  those Makefiles, so the distance never changed. Removed those two
  rows, added the rule that decides it (shorten only where the target
  did not also move), and added six paths the table omitted:
  scripts/readme-demo/README.md, scripts/profile-tags/guards_test.go,
  install_test.sh's WORKFLOW, demos/session-budget's
  hitl-with-claude-code.md, docs/laptop-token-savings.md, and
  proxy-init/README.md. Eleven paths, not seven.
- Spec section 9 said "three commits"; the branch landed nineteen. The
  core intent held (one sweep commit, one rehome commit, three
  prose-merge commits for CLAUDE.md) but this repo's convention of
  committing and revising dated design/plan docs in place supplies the
  rest. Prose now names all nineteen.
- docs/framework-architecture.md pointed CHANGELOG.md at authbridge/,
  which no longer exists.
- Makefile's fmt target claimed to match the ruff pre-commit hooks but
  excluded any tests/ directory rather than only the root one, missing
  sparc-service/tests. --exclude ./tests anchors it the same way the
  hook's ^tests/ does.
- Two demo Makefile comments (echo, hr-cpex) still described climbing
  to authbridge/; the arithmetic was already correct for the repo
  root. Comments only -- AUTHBRIDGE_ROOT is not renamed.
- CLAUDE.md cited plugins/opa/tool_parameters_rego_test.go; the real
  path is authlib/plugins/opa/tool_parameters_rego_test.go (wrong
  before the flatten too).

Verified: grep for ./authbridge Dockerfile contexts is empty, sh
install_test.sh reports 113 passed, and GOWORK=off go build ./... in
authlib is clean.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
The sweep matched `authbridge/` WITH a trailing slash, so every spelling of the
directory that lacks one survived the flatten. Three classes, each swept
repo-wide by shape before any edit; all three re-run clean afterwards.

STALE-PATH-DRIFT - 12 sites.
  Swept: 1,283 raw `authbridge` mentions -> 376 where it reads as a path
  segment -> 27 carrying a trailing slash (shape A) + 16 used as a bare
  directory argument (shape B). Shape B is the one the original sweep's
  pattern could not match.
    - 9 bare `cd authbridge` lines became `# from the repo root`. There is no
      directory left to enter, so the cwd is a precondition now rather than a
      command, and a comment keeps each block copy-pasteable. Every one of
      these blocks then does `pip install -r requirements.txt` or
      `kubectl apply -f demos/...`, so they failed at step 1.
    - `cd cortex/authbridge` -> `cd cortex`, matching the convention this
      branch already applied in .claude/skills/demo/SKILL.md.
    - 2 inline `cd authbridge && podman build ...` lost the prefix. In the cpex
      README the line above left cwd in authlib/, so it becomes `go -C authlib`
      (the spelling ci.yaml uses) and the block stops depending on cwd at all.

RENAME-DRIFT - 5 sites.
  authbridge/README.md became docs/architecture.md, so link text calling it a
  README names a file type the target no longer has. Swept for link text
  mentioning README whose target is not a README: 5 found, 5 fixed. The two
  labels reading "AuthBridge Overview" are left alone - that one is a
  description, and it is still accurate.

DEAD-GUARD - 1 site.
  security-scans.yaml's Bandit step looped `for dir in .` over a path that
  always exists, so neither the loop nor the `[ -z "$PYTHON_DIRS" ]` check
  below it could take either branch. Collapsed both to `PYTHON_DIRS="."`.

The four Dockerfile build-context comments and framework-architecture.md's
`authbridge/CHANGELOG.md` were in this commit until d8617f5 fixed them
independently; this rebase drops those hunks in favour of that wording.

RETRACTED, deliberately not fixed: the `UID/GID 1000 ... must match
runAsUser/runAsGroup` bullet that the CLAUDE.md merge dropped from
authbridge/CLAUDE.md:630. It constrains injection of the client-registration
container, and line 199 of that same base file already recorded that sidecar as
"removed entirely"; no client-registration image exists in the tree and no
Dockerfile uses UID/GID 1000. Dead content, correctly dropped - restoring it
would re-ship a stale claim. Swept the class anyway (448 source lines -> 53
similarity candidates, the sweep self-tested against this known instance):
nothing else was lost.

Verified: install_test.sh 113/113, pytest 12/12, the 7-mutation install.sh
suite unchanged at 6 killed / 1 survivor (that survivor is a pre-existing,
untouched guard, filed rather than fixed). pre-commit clean on the changed
files. Net -11 lines, no file outside the branch's existing set.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
Targeted follow-up requested during PR review of the authbridge/
flatten: trim the wide root without adding or renaming any directory.

- Delete uv.lock: 3 lines, locks zero packages, and asserts
  requires-python = ">=3.14" while pyproject.toml targets py312.
- Delete install-demo.sh: a forwarding shim for a name that predates
  it; both its old and new URLs are dead now that authbridge/ is gone.
  docs/proposals/tool-prune.md keeps its three references untouched --
  it is a dated, implemented design record.
- Fold pyrightconfig.json into pyproject.toml's new [tool.pyright]
  section (pythonVersion + typeCheckingMode); pyright reads it natively.
- Move local-build-and-test.sh and verify-spire-keycloak.sh into the
  existing scripts/, updating every prose/invocation reference (11
  sites) plus the path arithmetic inside local-build-and-test.sh,
  which resolved ROSSOCTL_DIR and its Docker build-context cd calls
  relative to the script's own directory -- now REPO_ROOT (one level
  up) so both still land in the same places after the move.

install.sh is untouched, including its --ref probe of an old release's
authbridge/install.sh path for pre-flatten releases.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>

@esnible esnible left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

An exceptionally careful mechanical refactor. 961 of the 970 renames are clean authbridge/ prefix strips, and the 9 that aren't are all intentional (README.md -> docs/architecture.md, two root scripts into scripts/) or git rename-detection artifacts. The inline comments explaining why each path change was made the way it was are what made this reviewable at 1067 files.

One must-fix, plus two questions about changes that aren't path flattening.

Author: huang195 (MEMBER — maintainer)
Areas reviewed: Go, Shell, CI/GitHub Actions, Docker, Helm-adjacent config, Python, Docs, Agent config
Agent/IDE config (.claude/.vscode): .claude/skills/demo/SKILL.md — inspected in full; pure markdown path-prefix removal, no hooks/commands/executables. No .vscode/ changes.
Commits: 22 commits, all signed-off: yes
CI status: all 24 checks passing


Two findings on deleted files (can't be inlined)

uv.lock (deleted) — suggestion. Deleting a lockfile is a behavior change, not a path flatten, so it doesn't really belong in this PR. It's defensible — pyproject.toml has no [project] table, so nothing here was ever uv-managed, and the real deps live in requirements.txt. But requires-python = ">=3.14" was recorded nowhere else, and dropping it leaves only the pythonVersion = "3.12" carried over from pyrightconfig.json, which disagrees with it. Could you confirm this is intentional, ideally as its own commit?

authbridge/install-demo.sh (deleted) — suggestion. This shim's stated purpose was that its URL had been published in release notes. Two live releases still carry a now-dead bootstrap URL in their notes:

  • v0.7.0-alpha.4
  • main-latest (the rolling channel)

both pointing at https://raw.githubusercontent.com/rossoctl/cortex/main/authbridge/install.sh, which 404s once this merges. The new two-layout probe can't rescue this: it only runs after install.sh has been fetched, so a dead bootstrap URL fails before any of that logic is reached. Worth either keeping a root-level install-demo.sh shim or editing those two releases' notes as part of the merge.


Verified correct

  • The two-layout probe itself is right. Fallback fires on a clean 404 only — a transport error (000) or 5xx correctly reaches the die rather than silently dropping to main, which is the security-relevant property. Mixed-layout resolution is structurally impossible since the installer script is the only path-dependent asset (release downloads use flat asset names). Both layouts are covered non-vacuously in install_test.sh, including the 000 -> 200 case that must not fall back.
  • .gitignore anchoring. Nice catch adding the leading slashes — a bare abctl or profile-tags post-flatten would have matched the package directories at any depth and silently ignored new source files under them. That's exactly the bug class a careless flatten introduces.
  • .dockerignore (new). The whole-path-vs-basename anchoring note is accurate. I verified the load-bearing claim: zero tracked blobs match cmd/*/authbridge-*, and there are no top-level bin/dist/abctl/profile-tags trees that the bare entries would wrongly exclude.
  • Paths all resolve at HEAD: go.work (all 9 modules incl. ./scripts/profile-tags), all 12 go.mod files, every dependabot directory:, and every CI-referenced file (CPEX_FFI_VERSION/CPEX_FFI_ABI, all five Dockerfiles, proxy-init/test-enforce-redirect.sh).
  • scripts/profile-tags/guards_test.go: repoRoot correctly rebased ../../.. -> ../.. while cmdDir correctly stays ../../cmd.
  • The 6 plugins_{contextguru,sessionbudget,sparcplugin}.go "swaps" between authbridge-proxy and authbridge-envoy are byte-identical files that git's rename detection paired arbitrarily — not real moves, nothing to fix.
  • pyrightconfig.json -> pyproject.toml migration is faithful (both keys preserved). tests/test_keycloak_sync.py's parents[1] is correct now that both tests/ and keycloak_sync.py are at root.
  • ci.yaml go-tidy-check widening to find . -name go.mod genuinely ran and passed, so all 12 modules including demos/* tidy clean.

Assisted-By: Claude Code

Comment thread install.sh Outdated
in order to start Cortex. Either use the installer that shipped with it:
curl -fsSL https://raw.githubusercontent.com/${REPO}/${version}/authbridge/install.sh | sh
in order to start Cortex. Either re-run this installer pinned to that release,
which resolves its installer in either layout:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must-fix — this advisory sends the user into a loop on the path where they're most likely to hit it.

The text claims --ref=${version} "resolves its installer in either layout", but on the local-file path that isn't true. Line 428:

{ [ -f "$0" ] && [ -r "$0" ]; } && _reexec=""

suppresses the re-exec entirely when the script is a readable local file (git clone then ./install.sh or sh install.sh). The two-layout probe block never executes, and line 432 then makes --ref=X pin binaries only:

[ -z "${_reexec}" ] && [ -z "${SCRIPT_REF}" ] && VERSION_REF="${WANT_REF}"

So a user who hits "the ${version} abctl has no 'service' command" and follows this instruction verbatim re-runs the same local script, reinstalls the same too-old abctl, and dies with byte-identical output. The script's own comment at lines 430-431 already spells out this limitation ("--ref=X selects X's binaries even though this local script, not X's, is the one running").

On the pipe path the advice is merely circular rather than looping — the re-exec already happened, so the running script is ${version}'s installer.

Before this PR the message handed over a concrete URL that actually worked:

    curl -fsSL https://raw.githubusercontent.com/${REPO}/${version}/authbridge/install.sh | sh

Suggest either restoring a concrete URL, or scoping the claim to the pipe form — e.g. curl -fsSL https://raw.githubusercontent.com/${REPO}/main/install.sh | sh -s -- --ref=${version}, noting that the flat-layout URL is only valid on main/post-flatten refs (which is exactly why the probe exists). Only the second suggestion in the current message (--ref=<newer tag>) actually resolves the user's situation.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed and fixed in 87e9c01 — thank you, this was exactly right.

Verified the mechanism you named: :428 empties _reexec when $0 is a readable file, the probe block is guarded by if [ -n "${_reexec}" ], and :432 then pins binaries only. The comment at :429-431 already said so, which makes the advisory a self-contradiction inside one file.

Took your second suggestion — a concrete command scoped to the piped form:

curl -fsSL https://raw.githubusercontent.com/${REPO}/main/install.sh | sh -s -- --ref=${version}

with the reason stated inline ("a local copy of this script never re-execs, so --ref would pin only its binaries and land you back here"). Both eras were already covered non-vacuously, so the mechanism is measured rather than asserted: --ref=v0.8.0 falls back to the legacy path and re-execs (404 then 200) and --ref=v9.9.9 with /install.sh present (200) both reach REEXECED, and local file, --ref=v0.5.0: … no re-exec pins the $0 claim.

I swept the class rather than just this line — all 18 --ref mentions in install.sh plus CONTRIBUTING.md. Two other candidates say the same thing (usage():186 and CONTRIBUTING.md:117, both "--ref=X installs both the script and the binaries"), but each sits immediately inside a curl | sh context where it is true, so I left them rather than qualify them. Recorded in the commit message so a later round doesn't re-find them.

Comment thread install_test.sh Outdated
# shellcheck disable=SC2016 # same.
printf ' [ -z "${_out}" ] || printf "#!/bin/sh\\nprintf \\"REEXECED\\\\n\\"\\nexit 0\\n" > "${_out}"\n'
printf ' printf "%%s" "%s"\n' "${_http}"
printf ' case "${_u}" in */authbridge/install.sh) _c="%s" ;; *) _c="%s" ;; esac\n' "${_httplegacy}" "${_http}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit — the stub discriminates by suffix, so it verifies which layout bucket was chosen but never that the URL was well-formed.

Everything that isn't */authbridge/install.sh — including a URL with a mis-interpolated ref, a stray double slash, or a truncated path — falls into the *) arm and returns the scenario's new-layout code. A regression in root-URL construction would still pass these tests.

Worth casing on the full expected URL (https://raw.githubusercontent.com/rossoctl/cortex/${_want}/install.sh) and making an unrecognized _u fail loudly rather than quietly returning the new-layout status.

Same vicinity: the mktemp stub returns a fixed boot.$$ and the non-200 branch never truncates it. I couldn't construct a false pass today (the real code rm -fs in every non-re-exec arm, and $$ differs per probe subshell), but a : > "${_out}" in the non-200 branch would make [ -s "${boot}" ] robust against a future refactor.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both applied in 87e9c01, and the first one turned out to be demonstrable rather than theoretical.

URL shape. The stub now pins the whole URL and returns BADURL for anything else, which is neither 200 nor 404 and so reaches install.sh's die. I couldn't case on the fully-expanded URL as suggested, because the stub doesn't know the resolved ref — --ref=<CHANNEL_TAG> maps to main and the no---ref case comes from newest_release, so an exact match would fail on its own fixtures. Pinned the shape instead (scheme, host, repo, layout) plus explicit rejection of // and a missing segment.

I measured the gap rather than assuming it. Mutation: drop the ref from the root URL, yielding .../cortex//install.sh.

Stub Verdict
old, suffix-only SURVIVED — all 113 cases passed a malformed root URL
new, whole-shape killed — 4 cases fail

So your read was exactly right: a root-URL regression was invisible to the whole suite.

mktemp/truncation. Added : > "${_out}" on the non-200 path, so the stub matches real curl -o. Worth being precise that this does not close the related gap: [ -s "${boot}" ] in install.sh:489 still has no killing test — a mutation removing it survives all 113 cases, because no scenario produces a 200 with an empty body. That guard is pre-existing and untouched by this PR, so I've recorded it in the PR body as deferred rather than growing this diff. Happy to file it.

Two stale names survived both prior renames because neither is a path the
sweeps could match — they are prose inside a docstring.

The issue link named kagenti/kagenti-extensions. Issue 676 does still resolve
there via GitHub's rename redirect, but it names a repository that no longer
exists under that name; it now points at rossoctl/issues/676 directly.

The debug hint said `kubectl logs -n kagenti-system`. That namespace is
rossoctl-system in 40 other files, but the fix is not to substitute one literal
for another: sparc-service/deploy/sparc-service.yaml says "any namespace;
rossoctl-system by convention" and "No namespace is baked in — apply with
`kubectl -n <namespace> apply -f`". A hardcoded namespace in a copy-pasteable
hint is what went stale in the first place, so the hint now takes <namespace>
and cannot rot again.

Everything else matching kagenti or rossocortex is inside
docs/superpowers/{plans,specs}, which keep their historical text by the same
convention that leaves stale authbridge/ strings there.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
Both from @esnible's review. Two classes, each swept before editing.

GUARD-REACHABILITY - 3 candidates swept, 1 genuine, fixed.
  install.sh's version-mismatch die advised `--ref=${version}` and claimed it
  "resolves its installer in either layout". It cannot, on the path a user is
  most likely to be on: :428 empties _reexec when $0 is a readable file, the
  two-layout probe block is guarded by `if [ -n "${_reexec}" ]`, and :432 then
  makes --ref pin binaries only -- which the comment at :429-431 already says.
  So `git clone && ./install.sh` followed that advice, re-ran the same local
  script, reinstalled the same too-old abctl and died with identical output.
  Only the message's second suggestion ever helped.

  Restored a concrete command, which is what this message carried before the
  flatten, scoped to the piped form where the probe demonstrably does run.
  Both eras are already covered non-vacuously: install_test.sh's
  `--ref=v0.8.0 falls back to the legacy path and re-execs` (404 then 200) and
  `--ref=v9.9.9 with /install.sh present` (200) both reach REEXECED, and
  `local file, --ref=v0.5.0: ... no re-exec` pins the claim about $0.

  Swept every `--ref` advisory in install.sh (18 mentions) plus CONTRIBUTING.md
  and usage(). The other two candidates -- usage():186 and CONTRIBUTING.md:117,
  both "--ref=X installs both the script and the binaries" -- sit inside a
  `curl | sh` context where that is true, so they are left alone rather than
  qualified. Recorded so a later round does not re-find them as new.

UNFAILABLE-ASSERTION - 1 site, fixed, plus one robustness gap.
  install_test.sh's curl stub cased on the URL *suffix*, so anything that was
  not `*/authbridge/install.sh` -- a mis-interpolated ref, a doubled slash, a
  truncated path -- fell into `*)` and returned the new-layout status. A
  regression in root-URL construction still passed all 113 cases. The stub now
  pins the whole URL shape and returns BADURL otherwise, which is neither 200
  nor 404 and so reaches install.sh's die.

  Also made the stub faithful to `curl -o`, which truncates on a non-200; it
  did not, so `[ -s "${boot}" ]` was only ever met by an empty file left by
  luck. Forward-looking, per the review: no false pass was constructible today.

Deferred, recorded in the PR body rather than fixed here: two live releases
(v0.7.0-alpha.4, main-latest) carry a bootstrap URL in their *release notes*
that 404s once this merges -- verified, 2 of 43 releases. Release notes are not
files, so no tree sweep could have seen them, which is why the body's
"every reference across public GitHub" measurement missed them. The remedy is
editing those two releases' notes at merge; a root-level install-demo.sh shim
would not serve the dead URL and so cannot fix it.

install_test.sh 113/113 before and after.

Mutation gate for this round's own new assertion (the stub's BADURL arm), with
the delta measured rather than asserted -- M-URL drops the ref from the root URL,
yielding .../cortex//install.sh:

| Mutation | Stub | Verdict |
|---|---|---|
| M-URL | new whole-URL stub | killed -- 4 cases fail |
| M-URL | old suffix-only stub | SURVIVED -- all 113 passed a malformed root URL |

That second row is the gap this fixes. Re-ran both prior suites: the 7-mutation
install.sh set is unchanged at 6 killed / 1 survivor, and the round-2 claim
verifier is 13/13, so no earlier guard was deleted. The lone survivor is still
`[ -s "${boot}" ]`: making the stub truncate did NOT close it, because no
scenario produces a 200 with an empty body. It stays deferred, not fixed.

shellcheck --severity=error clean; sh-mode notes unchanged at 14 before and
after. pre-commit clean on both files.

On the uv.lock question: all three CI Python setups pin python-version '3.12'
(ci.yaml:34, ci.yaml:274, security-scans.yaml:145), so the deleted lockfile's
requires-python = ">=3.14" excluded the interpreter CI actually runs. It was a
false assertion rather than a floor worth keeping, the root pyproject.toml has
no [project] table so it never declared a requirement, and sparc-service keeps
its own ">=3.10". The surviving pythonVersion = "3.12" is the one that agrees
with the build.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
@huang195

Copy link
Copy Markdown
Member Author

Replies to the two deleted-file findings, which couldn't be inlined. Both inline comments are addressed in 87e9c01.

install-demo.sh / the two release notes — you found something no sweep here could have

Verified independently: 2 of 43 releases carry the URL in their notes.

gh api repos/rossoctl/cortex/releases --paginate \
  --jq '.[] | select(.body | test("authbridge/install\\.sh")) | .tag_name'
# -> main-latest, v0.7.0-alpha.4

And your mechanism is right: the probe lives inside install.sh, so a 404 on the bootstrap fetch happens before any of it runs.

This is a genuine scope hole in the PR's own measurement, and worth naming as such: the body claimed "every reference across public GitHub", but the sweep behind it read repository trees. Release notes aren't files, so no git grep could ever have seen them. I've scoped that quantifier to what was actually measured and recorded the gap.

One correction on the remedy, though — of your two options only the second works. A root-level install-demo.sh serves main/install-demo.sh, but the URL in the notes is main/authbridge/install.sh, so the shim never answers it. The only alternatives are editing those two releases' notes, or restoring a file at authbridge/install.sh — which re-creates the directory this PR exists to delete. So: merge-time action to rewrite the URL in both releases' notes, now recorded in the body. Not doing it pre-merge since it mutates published releases.

uv.lock — confirmed intentional, and the disagreement resolves toward 3.12

All three CI Python setups pin python-version: '3.12' (ci.yaml:34, ci.yaml:274, security-scans.yaml:145), so the lockfile's requires-python = ">=3.14" excluded the interpreter CI actually runs. It wasn't a floor being lost — it was an assertion contradicting the build, recorded in a file that locked zero packages. The root pyproject.toml has no [project] table so it never declared a requirement, and sparc-service/pyproject.toml keeps its own ">=3.10". The surviving pythonVersion = "3.12" is the statement that agrees with CI.

Fair point that it's a behavior change rather than a path flatten. It landed in the straggler commit alongside the other root-file cleanup rather than on its own; I'd rather not re-split the history at this point, but the reasoning is now in that commit message and the body.

@esnible esnible left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. Re-reviewed end to end after the last two commits; no must-fix, suggestion, or nit items remain.

Scale: 1067 files — 970 renames, 37 added, 22 modified, 38 removed. All 27 CI checks green, 24/24 commits signed off. CodeRabbit skipped itself (1054 files over its 100-file limit), so this pass is the only full review of the diff.

Verified independently rather than taken from the description

  • go-tidy-check scope. find authbridge → find . reads like a widening. It isn't: all 12 go.mod files resolve under the root on this branch, so the set is identical. Same for dependabot-tidy.yml's **/go.mod filter.
  • .dockerignore bare-name entries. Cross-checked abctl, bin, dist, profile-tags, readme-demo against all 1228 tracked paths — zero collisions. The anchoring comment's reasoning about whole-path matching holds.
  • .gitignore leading slashes. Load-bearing exactly as the comment claims — a bare abctl would have matched the package directory cmd/abctl/ and silently ignored new source under it.
  • Makefile --exclude ./tests. sparc-service/tests/ does exist, so the root-anchored spelling is required and the three-way comment is accurate.
  • scripts/local-build-and-test.sh. REPO_ROOT="$SCRIPT_DIR/.." resolves to the directory holding go.work; all four Docker contexts plus proxy-init re-anchored, no stale SCRIPT_DIR left. This was the one change that could have broken silently, and it didn't.
  • install.sh:475-486. The probe falls back only on a clean 404, never on a transport error — 000 correctly does not trigger the legacy path.
  • Retargeted doc links. Sampled targets all resolve on the head tree.
  • Residual sweep. The only authbridge/ strings left in live files are intentional historical prose and /etc/authbridge/config.yaml, which is a runtime path unrelated to repo layout.

On the deliberate exclusions

Agreed on all of them, install.sh:485 especially — the legacy probe has to stay or --ref= breaks for every pre-flatten release, and the install_test.sh stub keying on the same string is the right way to pin that. The docs/superpowers/ precedent from #1125 is also right.

Merge-time action, not a code change

The two release notes (main-latest, v0.7.0-alpha.4) still print main/authbridge/install.sh, which this PR makes a 404. The bootstrap probe genuinely cannot rescue those — it lives inside the script that fails to fetch — so they need the manual rewrite called out in the description. Worth doing at merge rather than after, given the scripted-consumer failure mode (curl exit 56, then sh exits 0 having installed nothing).

The rossoctl/rossoctl docs pages and the downstream operator / rossoctl-cli module-path bumps are correctly scoped as coordinated follow-ups; both downstreams pin pre-flatten pseudo-versions, so neither breaks on this merge.

Supply-chain gate

.claude/skills/demo/SKILL.md tripped the agent-config gate. Read in full: five path-string updates in a markdown doc, no hooks, no command, no executables, no new files. Cleared by inspection.

The commit-order narrative and the "three things free / three things not free" framing made this reviewable at a scale where it otherwise wouldn't have been — the fixed-depth-path test (does the target also move?) is the part worth reusing on the next sweep of this kind.

Assisted-By: Claude Code

@huang195
huang195 merged commit c4f8ffb into rossoctl:main Sep 26, 2026
39 of 40 checks passed
@huang195
huang195 deleted the refactor/flatten-authbridge branch September 26, 2026 13:22
huang195 added a commit that referenced this pull request Sep 26, 2026
The flatten removed the vestigial authbridge/ level and exposed two things it had
been hiding: the root does not describe the product (four of ten directories are
implementation satellites), and the names are a product generation behind.

authlib is the sharpest case, and not merely because of the AuthBridge->Cortex
rename. Measured by non-test lines it is 1.7% auth: 65% framework, 22% cost, 10%
observability. The docs compound it, calling it "the shared auth library" and
enumerating the 1.7% first while omitting the 32%.

Scope deliberately excludes every published contract — image names the operator
selects by name, binary names on users' PATH, the x-authbridge-* wire headers
injected by Helm-rendered Envoy config, the AUTHBRIDGE_* env vars install.sh
accepts, the authbridge-* ConfigMaps, /etc/authbridge, authproxy-routes, the abph_
prefix, and install.sh's --ref probe. "Do not break anything" is written as twelve
gates rather than an intention.

Section 6 carries forward the class that cost #1134 a review round: its
substitutions matched authbridge/ WITH a trailing slash, so sixteen bare-directory
spellings survived. authlib has nineteen of the same shape, enumerated by count.
Unlike #1134 the replace directives DO change, both sides, five of them.

Self-review caught three errors of mine before commit: the module count is 12 not
13 (storage/redis is already one of them, so moving it adds none), there are five
build profiles not four (cpex is image-only, needing cgo), and "build.yaml's six
name: values" was a bad gate since a grep for '- name:' returns 15 including step
names.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
huang195 added a commit that referenced this pull request Sep 26, 2026
Six tasks, one per commit, so a rename touching 850 import sites can be reviewed
piecewise: group the deployables under deploy/, consolidate the loose dev scripts,
rename authlib to core, move the redis driver beside the interface it implements,
rename five packages inside core/, then fix the prose and retire the script.

Three lessons from #1134 are wired into the mechanics rather than left as advice.
Every substitution matches the bare name without requiring a trailing slash —
that omission is exactly what let sixteen spellings survive the flatten, nine of
them cd lines whose blocks then failed at step 1. Verification decomposes by shape
(raw mentions, then each spelling) instead of trusting the patterns. And pytest is
in the gate set, which it was not last time, when a dead parents[1] path broke
collection.

Two hazards are named where they live. Task 2: the dev scripts compute REPO_ROOT
from SCRIPT_DIR, so moving them one level deeper changes that arithmetic — the
identical hazard was live in the previous PR. Task 5: the new package names
`event` and `settle` are short common words, so a local variable can shadow the
new package; only the build proves it.

Unlike the flatten, the replace directives change on both sides, and storage/redis
is the only directory that changes depth.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
huang195 added a commit that referenced this pull request Sep 26, 2026
The three deployables moved one level deeper, so relative links out of
their READMEs — to .github/, demos/, docs/ and authlib/ — now land in
deploy/ and 404. Nothing in the diff showed it: the link text never
changed, only the ground beneath the file.

This is the class that cost #1134 a review round, and it is gate 11 of
the design spec. The Task 1 brief named the prose-cd shape and not this
one, so both the implementer's sweep and my own verification missed it.
Grep-by-name cannot see it — a link's text does not mention the moved
directory. Only resolving targets on disk finds it, checked against the
base commit to tell a new break from a pre-existing one.

deploy/sparc-service/deploy/README.md needed ../../../ for its three
docs/ links while keeping ../README.md, which points at its own parent
and already resolved. A blanket ../ -> ../../ would have broken it.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
huang195 added a commit to huang195/kagenti-extensions that referenced this pull request Sep 27, 2026
install.sh, install_test.sh and keycloak_sync.py were the last loose files at
the repository root; they now sit in scripts/ beside dev/, hooks/,
profile-tags/ and readme-demo/. Git records all three as renames.

THIS CHANGES A PUBLISHED URL. The one-liner becomes

  curl -fsSL https://raw.githubusercontent.com/rossoctl/cortex/main/scripts/install.sh | sh

and is updated in README.md, CONTRIBUTING.md, the release-notes generator, the
script's own header and --help, and the README demo storyboard. Older tags are
unaffected because raw.githubusercontent serves per ref; what breaks is a copy
of the previous URL pinned to main. This reverses the constraint recorded in
docs/superpowers/plans/2026-09-26-repo-layout.md, which excluded install.sh
from the layout work — a deliberate call, not an oversight.

The bootstrap probe goes from two paths to three. `--ref=<tag>` re-downloads
the installer from that ref, so it must still resolve every layout the script
has had: scripts/install.sh, then the repository root (from the rossoctl#1134 flatten
until now), then authbridge/install.sh (before it). Each fallback fires only on
a clean 404 — a transport error still refuses to continue, which is the
guarantee the block exists to give, and it now has to hold on two hops rather
than one.

install_test.sh's scenario matrix takes a status triple instead of a pair, and
all eleven cases were re-derived rather than padded: what the old pair called
"new" is now the middle hop. Two cases are new, because without them the
change would have been untested in both directions:

  404/404/200 -> REEXECED   the third arm is otherwise never exercised, so
                            deleting it would leave the suite green while
                            dropping every pre-flatten tag
  404/000/200 -> DIED       "clean 404 only" otherwise holds on hop 1 and goes
                            unchecked on hop 2

The fake-curl stub gained an arm for the new path, ordered ahead of the bare
one because shell `*` matches `/` and `*/install.sh` would otherwise swallow
`*/scripts/install.sh`. Its BADURL guard covers a ref dropped from the new path
too.

Also fixed, because the move would otherwise have made them false:
`sh install_test.sh` in ci.yaml, the module path in tests/test_keycloak_sync.py,
the runnable `python keycloak_sync.py` in docs/architecture.md, a second
location-dependent path in install_test.sh that resolved the release workflow
from the script's own directory (caught by the suite, not by the sweep), the
repo tree in CLAUDE.md, and a bandit comment calling keycloak_sync.py
root-level. demo.yaml's citation of install.sh line numbers is replaced with the
grep that finds them; two of the four were already stale and every edit here
shifts the rest.

Left alone deliberately: thirteen Go comments and the Makefile/CONTRIBUTING
prose name the script rather than its path, so they stay true; dated
docs/superpowers/ records are archives; and two apparent hits are other
projects' files (astral.sh's uv installer, ansible's run-install.sh).

Verified: 115 install_test.sh cases, 12 pytest, shellcheck --severity=error,
sh -n on both scripts, and the regenerated SVG against
TestCommittedAssetIsCurrent.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
huang195 added a commit to huang195/kagenti-extensions that referenced this pull request Sep 27, 2026
Three must-fix from a strict review of 699b05b, all of them statements that
were true before the scripts/ move and false after it. Two live in the PR body
and are fixed there.

scripts/install.sh — the --ref fallback warned that a ref "has no install.sh at
either path". The probe now tries three. The comment forty-six lines above was
updated with the code; this line, the only user-visible statement of what was
attempted, was not. Swept the class repo-wide across all filetypes: twenty-nine
hits for either/both/two paths, one of them about this probe — every other is a
different subject, from plugin code paths to quoted shell arguments. The arity
is dropped rather than corrected to "three", because a count here is maintained
in two places and has now drifted once.

scripts/readme-demo/demo.yaml — round 3 replaced four stale line citations with
an instruction to grep the quoted string instead, and that instruction resolves
only two of the twelve strings in the shell act: the rest interpolate a variable
at source, so the rendered line never appears in the tree. The conclusion was
right and the method was not; it now says to grep a literal prefix. Two further
citations twelve lines below (install.sh:1219, :1227-1233) are replaced the same
way. Those were already stale at the base commit, so this removes an existing
trap rather than one the move created.

scripts/install_test.sh — the stub's case-arm order is load-bearing, because
shell `*` matches `/` and the bare .../cortex/*/install.sh arm also matches
.../main/scripts/install.sh. Only 699b05b's commit message said so. The
constraint now sits beside the arms, and names the mutant that proves it: M37
reorders them and reds two scenarios.

Guards added for both classes. G36 pins that the fallback warn makes no arity
claim at all, with a positive control so a broken regex cannot read as a clean
line. G37 covers a gap the round-4 review identified in G26: G26 pins only
gh-derived counts, so it stayed green while "both edited YAML files re-parsed"
went from true at ea3a338 to false at HEAD, the delta having grown that set
from two files to six. M44 and M45 restore each defect and confirm the new
guards red; M45 also demonstrates G26 staying green, which is the gap itself.

Two corrections to 699b05b's message, which cannot be amended without
rewriting pushed history. It called docs/superpowers/ a "dated archive" while
CLAUDE.md, in the same file set, says those records are "STILL WRITTEN TO — not
an inert archive"; the triage was right and repo-sanctioned, only the word
collides. And it listed the sites updated for the new install URL without naming
the duplicate that README.md's own comment points at, in rossoctl/rossoctl's
laptop quickstart. That copy is still on the pre-rossoctl#1134 authbridge/ path, so it
was already broken before this PR; it is now recorded in the body's deferred
list instead of a commit message.

Verified: 115 install_test.sh cases, shellcheck --severity=error, and the
readme-demo suite including TestCommittedAssetIsCurrent — the demo.yaml edits
are comments, so the generated SVG is unchanged.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants