Skip to content

fix(ci): estate audit — remote-form refs at FULL SHA + de-onboarded (the empirically complete cross-repo form) - #18

Merged
hyperpolymath merged 1 commit into
mainfrom
remote-sha-deonboarded
Sep 17, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
remote-sha-deonboarded

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

The empirically complete cross-repo form: remote-form refs at FULL SHA + de-onboarded.

af706238's onboarded @main/tag form died 0-job startup_failure cross-repo (rsr run 35280642055 — creation-time enforcement evaluated under the CALLER's jurisdiction; silent as all 0-job rejections are). The complete witnessed matrix:

callee form local cross-repo
$/ onboarded ✅ ❌ 0-job — running commit = caller's (35277504987)
./ + lock entry ❌ 0-job —
./ de-onboarded ✅ ⚠️ spawns; ./ = caller's repo (35279718644)
remote @main + lock (onboarded) ✅ (35280317253) ❌ 0-job startup_failure (35280642055)
remote @sha + de-onboarded (this PR) witness below witness below — both components independently proven: creation passes de-onboarded (35279718644 spawned); prepare downloads remote SHA composites under the caller's sha_pinning_required (same run fetched deed/k9@SHA)
  • 26 gate refs → hyperpolymath/cicd-suite/actions/*@af706238… (full SHA; actions/** unchanged since ecd0240d), checkout → @3d3c42e… (v7.0.1)
  • lock: audit entry + orphaned cicd-suite@main key removed; deed/k9 SHA keys kept — the onboarded code-hygiene-self-test.yml ($/actions/manifest-check) retains full lockfile enforcement over composite changes
  • gh actions-lock --no-fix: clean (rc=0)
  • bare checkout fetches the CALLING repo cross-repo → the gates audit the caller's estate (design intent); gate implementations pinned to the SHA — repin when actions/** change (disclosed in-file)

This closes the last gap between the two repos' policies: every ref in the callee graph is a full SHA (satisfies sha_pinning_required on either side without needing caller-side lock coverage), and nothing cross-repo depends on lockfile enforcement at creation time.

…the empirically complete cross-repo form)

af70623's onboarded @main/tag form died 0-job startup_failure
cross-repo (rsr run 35280642055 — creation-time enforcement under
the CALLER's jurisdiction). The only combination with BOTH components
independently proven cross-repo is remote-form refs at full commit
SHAs with this workflow de-onboarded:
  - creation passes de-onboarded: rsr run 35279718644 SPAWNED jobs
  - prepare downloads remote SHA composites under the caller's
    sha_pinning_required: same run fetched deed/k9@SHA fine
26 gate refs -> @af706238 (this commit's tree; actions/** unchanged
since ecd0240), checkout -> @3d3c42e (v7.0.1). Lock: audit entry +
cicd-suite@main key removed (orphaned); deed/k9 SHA keys kept — the
onboarded self-test ($/actions/manifest-check) still fully enforces
composite changes. --no-fix: '1 workflow skipped', rc=0.
Trade-offs disclosed in-file; repin SHAs when actions/** change.
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 03be5b8a-70a3-4b8a-b1e5-5dc879b0df99

📥 Commits

Reviewing files that changed from the base of the PR and between af70623 and b15202a.

⛔ Files ignored due to path filters (1)
  • .github/workflows/actions.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • .github/workflows/main-estate-audit.yml

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.

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 1254057 into main Sep 17, 2026
6 checks passed
@hyperpolymath
hyperpolymath deleted the remote-sha-deonboarded branch September 17, 2026 22:31
hyperpolymath added a commit that referenced this pull request Sep 22, 2026
…#34)

Closes #33.

## What was broken

`Gate controls` has been dead since `3b4afaf` (#28), dying in `Set up
job` with **1 step and no gate ever executed**. Measured on run
`35786094563` (push, main, `fa71ac2`):

```
##[error]lockfile missing pin for hyperpolymath/deed-ecosystem@f9d999b
Gate controls: failure (1 steps)
```

## Mechanism

`uses: $/actions/manifest-check` is a same-repo ref — inherently pinned
at the running commit, no lockfile entry of its own required. But the
runner **also validates that composite's internals against the lock**,
and it does so against the *calling workflow's* entry in the
`workflows:` map. `manifest-check` reaches `deed-ecosystem` and
`k9-ecosystem` at full SHA, so both must appear under
`code-hygiene-self-test.yml`. Being present in `dependencies:` is **not
sufficient** — the map is keyed per workflow.

## Why it stayed invisible

| commit | effect |
|---|---|
| `ecd0240` (#16) | added both transitive SHA refs |
| #17, #18, #25 | survived; `Gate controls` green throughout |
| `3b4afaf` (#28) | regenerated the lock and **silently dropped both** |

`gh actions-lock`'s extractor reads step-level `uses:` only, so it
cannot derive a ref reached *through* a composite — a regenerate deletes
any added by hand. `--verify` then returns rc=0 on the result. #28's
commit message states it *"pins the SHA-form transitive deps reached via
called reusables"* while its diff removes exactly those, and that rc=0
was its cited proof. `gh actions-lock --no-fix` **still** prints
`Scanning 4 workflows`, rc=0, against the broken file today.

**The tool cannot see the defect it creates.** So the lockfile needs a
gate that is not the tool.

## Three fixes, because the defect had three parts

1. **Restore the two pins** — byte-for-byte the shape that was green at
`d6bc01a`, keeping the two `[]` keys #28 correctly added.

2. **`tests/lock-transitive-closure.sh`** — walks each onboarded
workflow's `$/` composites to a fixpoint and asserts every remote ref
reached is declared for that workflow, and that every declared ref
resolves in `dependencies:`. Reads YAML with `yq`, never `grep` (Rule
Y-1).

3. **`actions.lock` added to both `paths:` filters.** #28 was a
lock-only commit; no filter matched, so this workflow never ran on the
commit that broke it.

The guard runs in **`Composite shell contract`**, not `Gate controls`: a
missing composite-reached pin kills `Gate controls` in `Set up job`, so
a check living there could never report the very defect it tests for.

## Non-vacuity

Asserted, not assumed. The checked population must be non-empty — and
that assertion earned its place on this file's **first run**, catching a
jq-vs-mikefarah dialect bug where `--arg` failed as a lexer error and a
stray `2>/dev/null` turned it into a clean empty pass.

| mutant | expected | actual |
|---|---|---|
| the real broken lock at `fa71ac2` | red, naming both refs | ✅ `PASS=3
FAIL=2` |
| green-era lock at `d6bc01a` | green | ✅ `rc=0` |
| declared ref with no `dependencies:` entry | red | ✅ caught |

Local: `lock-transitive-closure.sh` **PASS=7 FAIL=0**;
`composite-shell-contract.sh` **PASS=7 FAIL=0** with its mutant killed.

## The witness

This PR's own run is the evidence. **`Gate controls` must spawn more
than 1 step** and actually execute the gate controls — 1 step means it
died in prepare again.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01WRvDivYwLSeVCJUrfjic3f

Co-authored-by: Claude Opus 5 <[email protected]>
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