Skip to content

feat(audit): exempt upstream-authored files from governance metadata (0.1.0-alpha.15) - #45

Merged
jaruesink merged 2 commits into
mainfrom
feat/upstream-authored-exemption
Aug 9, 2026
Merged

feat(audit): exempt upstream-authored files from governance metadata (0.1.0-alpha.15)#45
jaruesink merged 2 commits into
mainfrom
feat/upstream-authored-exemption

Conversation

@jaruesink

Copy link
Copy Markdown
Contributor

Takes §5. The stale-specifier discriminator is measured and not built — it fails, see below.

§5: upstream exemption

Your local-refs framing was right and it changed my read completely. upstream only has to be configured, not reachable — git ls-tree <ref> and git log <ref>..HEAD --name-only read refs already on disk. Two git calls per repo, not two per file. Where no upstream remote exists the check never fires.

openclaw: CRITICAL → NEEDS WORK, Validation Date Coverage 0/23 → pass, all 23 excluded. arbor, anvil, lc-classic-starter unchanged.

postiz-app does not become exempt, and your two framings disagree about it. By content it is byte-identical to upstream — but to upstream's CLAUDE.md, under a different filename. By history its AGENTS.md is a local file with one local commit and no counterpart at that path upstream, so the stated test git log upstream/main..HEAD -- AGENTS.md is not empty. Exempting it needs content-matching across renames — a different check, still network-free, worth measuring separately.

Also removes a fallback I added in alpha.13: when every governance file was exempt it fell back to the unexempted set, which re-failed exactly the repos this exemption exists for. Emptiness now splits — no governance files at all still scores 0 (a missing surface, which Governance Surface already fails), a surface we decided not to ask passes.

Stale-specifier discriminator: measured, do not build

Ran it across 33 repos. Your predicted error was right, and worse than predicted:

STALE-RENAME hits 3 — all false positives
True positives 0
@360training/cloudflare-proxy stayed quiet ✓ (that trap passes)
  • @medusajs/ui → flagged against @t360/ui. Medusa's real published package.
  • @lambdacurry/forms ×2 in lc-classic-starter → flagged against @lc-classic-starter/forms. Real published package, v0.22.7 on npm.

And it never sees @360training/ui at all — that specifier lives in .devagent/workspace/tasks/ and a package README, neither of which is a scanned rule surface. The check misses the one case it was designed for and fires only on collisions.

Root cause: ui, forms, utils, shared are the most common package basenames there are. Any monorepo with @scope/ui collides with every external @vendor/ui. Basename equality can't distinguish a rename from a coincidence.

Verify

lint · format:check · release:pin --check · typecheck · 517 pass / 0 fail · verify:self-audit-proof.

🤖 Generated with Claude Code

jaruesink and others added 2 commits August 9, 2026 14:40
A vendored fork carries the upstream project's own AGENTS.md. Asking it for a
`Last validated:` line asks us to write our first authored line into someone
else's document, which then conflicts on every merge — and until we do, the repo
sits permanently red for files carrying zero lines of ours.

Both signals are local, as proposed: `git ls-tree <upstream-ref>` for what
upstream ships and `git log <upstream-ref>..HEAD --name-only` for what we have
touched since diverging. `upstream` only has to be CONFIGURED, not reachable, so
the audit stays offline and deterministic. Two git calls per repo, not two per
file. Where no upstream remote exists the check never fires.

openclaw: CRITICAL -> NEEDS WORK, Validation Date Coverage 0/23 -> pass with all
23 excluded. arbor, anvil and lc-classic-starter are unchanged.

postiz-app does NOT become exempt, and the brief's two framings disagree about
it. By content it is byte-identical to upstream — but to upstream's CLAUDE.md,
under a different filename. By history its AGENTS.md is a local file with one
local commit and no counterpart at that path upstream. The stated test
(`git log upstream/main..HEAD -- AGENTS.md` empty) is false for it. Exempting it
would need content-matching across renames, which is a different check and a
network-free one worth measuring separately.

Also removes a fallback I added last round. When every governance file was
exempt the check fell back to the unexempted set to avoid reading an empty
denominator as 0% — which re-failed exactly the repos this exemption exists for,
since upstream authorship was not yet one of the exemptions. Emptiness now
splits: no governance files at all still scores 0, because that is a missing
surface Governance Surface already fails on, while a surface we decided not to
ask passes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: b4962c34-5a0b-4801-9acc-cbac8716821e

📥 Commits

Reviewing files that changed from the base of the PR and between 4295f8f and fbc1834.

📒 Files selected for processing (12)
  • README.md
  • docs-site/public/llms-full.txt
  • docs-site/src/content/docs/reference/cli.md
  • docs/byok-trust-model.md
  • docs/first-user-proof-packet.md
  • docs/first-user-proof.md
  • docs/getting-started.md
  • docs/proofs/current-outside-tester-send-packet.md
  • package.json
  • scripts/audit.ts
  • scripts/governance-metadata-scoping.test.ts
  • scripts/lib/upstream-authorship.ts

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

@jaruesink
jaruesink merged commit d537a1a into main Aug 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant