[AAASM-5675] 🐛 (examples): Gate Dependabot manifest coverage and fix the red live lane install - #439
Open
Chisanan232 wants to merge 8 commits into
Open
[AAASM-5675] 🐛 (examples): Gate Dependabot manifest coverage and fix the red live lane install#439Chisanan232 wants to merge 8 commits into
Chisanan232 wants to merge 8 commits into
Conversation
AAASM-5675 was filed after a Dependabot security job failed for weeks against a directory .github/dependabot.yml did not list. Security updates are advisory-driven and run against a manifest regardless of that file, so an unlisted directory does not go quiet — it gets a job whose configuration cannot satisfy it, and the vulnerable dependency stays put. The checker asserts two things against the real tree: each discovered manifest directory maps to an entry of its ecosystem, and each configured directory pattern expands to at least one manifest. The second is the one that hides — a mistyped path looks like coverage while delivering zero. Stdlib only, matching scripts/generate_example_metadata.py, so a parse failure cannot be caused by a missing third-party package. Refs AAASM-5675
Each green case is paired with the specific edit that should turn it red: an uncovered manifest, a mistyped directory pattern, a config missing its updates block, and an absent config file. A coverage checker that returns 0 on a tree it failed to parse is worse than no checker — it converts an unmeasured state into a reported-healthy one. The parser is therefore held to fail-closed behaviour by test, not by inspection. Refs AAASM-5675
Runs without a paths filter: the defect guarded against is a manifest arriving somewhere unanticipated, and a paths filter would have to predict those locations in advance — the same assumption that produced the gap. The script is stdlib-only and finishes in under a second. Also runs on pushes to main, because a pull-request-only gate leaves the default branch free to drift red between merges, which is the second half of what AAASM-5675 documented. This job reports but does not block: main lists zero required status checks today, and changing that is owner-gated under AAASM-5677. Refs AAASM-5675
The verify-live jobs run on ubuntu-latest, where Homebrew is absent, so `brew install ai-agent-assembly/tap/aasm` exited 127 with "brew: command not found" before the gateway was reached. That is why the three live check runs are red on main — not the rc-gated health-check timeout the script's header described. A repo-local scripting bug was masking the condition the lane exists to report. The release pipeline publishes per-component Linux tarballs, so the tap is not the only route: aasm-cli-<version>-linux-<arch> carries aasm and aa-gateway, aasm-api-<version>-linux-<arch> carries aa-api-server. Both are downloaded, checksum-verified against the release SHA256SUMS, and put on PATH via GITHUB_PATH so later steps in the job see them. The lane stays rc-gated on the SDK/transport tickets tracked outside this repo (AAASM-4447/4467/4468/4469/4446); this change does not address those. It makes the lane fail at the condition it documents rather than at a missing package manager. Refs AAASM-5675
Three claims repeated across the live-lane documentation were measured and found inaccurate: 1. "the release pipeline does not yet ship aa-api-server (AAASM-4449)" — it has since v0.0.1-rc.4. components.json lists an `api` component for linux-amd64/arm64 and the tarball contains an aa-api-server binary. Corrected at 4 sites: verify-live.yml, .claude/CLAUDE.md, and the go-agent and node-agent scenario READMEs. A 5th site, start-aasm.sh, was corrected in the preceding commit. 2. "continue-on-error: true quarantines the lane" — it quarantines the workflow RUN, not the per-job check runs. Measured on run 31779321984 (main @ 9edecae): run conclusion `success`, three job conclusions `failure`. That is why main presents as red while the scheduled run reports green. Documented as a known property, with an explicit note not to "fix" it by moving continue-on-error to the step level — that would hide the rc-gated state the Verification policy requires stay visible. 3. .claude/CLAUDE.md said the ghcr.io/ai-agent-assembly/aa-gateway image "is not published"; verify-live.yml's own header already said otherwise. The image is published, tagged v0.0.1-rc.6 and latest. CLAUDE.md now agrees with the workflow. Refs AAASM-5675
SonarCloud shell:S6506 flagged the three `curl -fsSL -O` calls: -L follows the release download redirect to objects.githubusercontent.com, and without a protocol constraint that chain could downgrade the transport for binaries this script then executes. --proto '=https' rejects a non-HTTPS URL outright and --proto-redir '=https' holds it across the redirect chain. Verified against the real rc.6 asset URL. Refs AAASM-5675
SonarCloud python:S3776 measured the single-loop parser at cognitive complexity 58 against a limit of 15. The parser's correctness is load-bearing — a config it silently misreads makes the gate report coverage it did not measure — so it should be reviewable in pieces. Split into isolate-the-updates-block, cut-into-entry-chunks, and read-one-chunk, with key splitting and entry validation as named helpers. Behaviour is unchanged: the 17 tests pass, the real tree still reports 36/36, and both injected defects still exit 1. Refs AAASM-5675
The health check polled 7700 for the full 120s while the gateway was healthy on 7391 within ~200ms. 7700 is the default for the standalone aa-api-server binary, which this lane downloads but never runs directly; `aasm start --mode local` embeds the API on the CLI's own --port, default 7391. So the first fix in this branch traded `brew: command not found` for a second repo-local defect of the same class — and the script then printed "This is the rc-gated failure described in verify-live.yml's header" into CI at exactly the point where that was false. A timeout says the probe did not succeed and nothing more. The script now prints what it probed and points at the gateway output, instead of naming a cause it has no way to determine. Found in independent review (AAASM-5675).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What changed
AAASM-5675 describes a defect pair: a Dependabot security job that fails against a directory its config cannot cover, and a repository where nothing makes that failure visible. This PR addresses the second half in the
examplesrepo and reports measurements for the first.The gate.
scripts/check_dependabot_coverage.pyasserts two properties against the real tree: each discovered dependency manifest directory (pnpm-lock.yaml,go.mod,uv.lock, plus.github/workflows/forgithub-actions) maps to an entry of its ecosystem in.github/dependabot.yml, and each configured directory pattern expands to at least one manifest. The second assertion is the one that matters most — a mistypeddirectory:reads as coverage while delivering zero, and is indistinguishable from the original bug without expanding it against the tree. Wired into CI on pull requests and pushes tomain(.github/workflows/dependabot-coverage.yml), with 17 unit tests.Why
mainis red. The threelive:check runs fail at.github/scripts/start-aasm.shline 18,brew: command not found, exit 127 — the jobs run onubuntu-latest, where Homebrew is absent. That is a repo-local scripting bug, and it was masking the rc-gated condition the lane documents. The script now installsaasmandaa-api-serverfrom the release's Linux tarballs, checksum-verified against the releaseSHA256SUMS.Stale claims corrected. Measuring the above turned up three inaccurate claims repeated across the live-lane docs; see the table below.
The
brewfix, measured on a real Linux runnerverify-live.ymlwas dispatched against this branch — run 31789721513 — rather than asserting the fix from a reading of the script. Identical result on the python, node and go jobs:Before: exit 127 at line 18,
brew: command not found, 7 seconds in. After: the CLI installs,aasm --versionanswers,aa-apistarts, and the job fails at the 120s health-check — the condition the script documents. That is the whole claim being made for this change; it does not make the lane pass.This run also reproduces the
continue-on-errormeasurement independently: run conclusionsuccess, three job conclusionsfailure.A lead, recorded rather than acted on.
aa-apiannouncesgenerated admin API key (set AASM_API_KEY to reuse), andassert-agent.sh/ the health probe callcurl -fsSwith no key — so a 401 would make-ffail and the loop spin to timeout. That is a hypothesis, untested here: it was not chased because the lane is separately rc-gated on AAASM-4447/4467/4468/4469/4446, so clearing it would not turn the lane green, and guessing at an auth header in a script this PR cannot verify end-to-end would substitute speculation for the measurement above.js-yaml — measured, already patched
The ticket's AC1 is satisfied in this repo, by earlier work rather than by this PR. Recorded here because "the absence of a red alert is not evidence of a green one" is the ticket's own standard:
node/mastra/pnpm-lock.yaml4.3.1GHSA-5p4m-2wfm-xmqj(>= 4.0.0, < 4.3.1) andGHSA-52cp-r559-cp3m(>= 4.0.0, < 4.3.0). Patched by #405scenarios/approval-gates/node/pnpm-lock.yaml5.2.3GHSA-pm4m-ph32-ghv5(<= 5.2.1),GHSA-724g-mxrg-4qvm(<= 5.2.0),GHSA-g796-fgmg-93mv(<= 5.1.0). Bumped by #387scenarios/policy-enforcement/node/pnpm-lock.yaml5.2.3Population: 12 pnpm lockfiles scanned, 3 resolve
js-yaml, 0 at a vulnerable version. The other 9 do not reference it.gh api repos/.../dependabot/alertsreturns zero open alerts across the repo; the js-yaml entry fornode/mastrareadsfixed. No dependency change was needed here, so this PR ships zero lockfile edits.The gate's fail-then-pass evidence
A gate that has only ever passed is measuring nothing, so both defect classes were injected against the real tree and reverted.
Baseline —
36 manifest directories map to an entry, with zero left over., exit0.Defect A, an uncovered lockfile (
node-extras/scratch-client/pnpm-lock.yaml, a directory no npm pattern reaches):Reverted: exit
0.Defect B, a mistyped directory (
"/node/*"→"/nodes/*", one character):Reverted:
36 manifest directories map to an entry, with zero left over., exit0.Both are also covered as unit tests, alongside fail-closed cases for an unparseable and an absent config — a coverage checker that returns 0 on a tree it failed to read converts an unmeasured state into a reported-healthy one.
The same pair, run through CI. A local exit code proves the script; it does not prove the workflow wiring. #440 was opened as a throwaway probe on a branch cut from this one, so this PR's history stays bisectable:
dependabot coverage18357d4— uncovered lockfile added3a1595f— the revertThe red run surfaced a GitHub error annotation naming the directory:
#440 is closed. Its branch is left in place for you to delete.
The parser was refactored after this proof was taken (see the Sonar section), so both defects were re-injected against the final code: exit 1 and exit 1, reverting to exit 0.
SonarCloud found two real defects in this PR's own code
Recorded because the first push turned the
SonarCloud Code Analysischeck red, and the cause was mine, not a pre-existing condition:shell:S6506× 3 — thecurl -fsSL -Ocalls follow a redirect (-L) toobjects.githubusercontent.comwith no protocol constraint, for tarballs the script then executes. Fixed with--proto '=https' --proto-redir '=https' --tlsv1.2, verified against the real rc.6 asset URL.python:S3776— the config parser measured cognitive complexity 58 against a limit of 15. A parser whose correctness decides whether the gate measured anything should be reviewable in pieces, so it was split into isolate-block / split-entries / parse-entry with named helpers.Quality gate is back to
OKwithnew_security_rating1.Stale claims — population found vs corrected
aa-api-server" (AAASM-4449)v0.0.1-rc.4.components.jsonlists anapicomponent for linux-amd64/arm64;tar tzf aasm-api-v0.0.1-rc.6-linux-amd64.tar.gz→aa-api-servercontinue-on-error: true" quarantines the lane31779321984(main @9edecae): run conclusionsuccess, three job conclusionsfailureghcr.io/ai-agent-assembly/aa-gatewayis not published" (.claude/CLAUDE.md, contradictingverify-live.yml's own header)v0.0.1-rc.6andlatestDependabot ecosystem coverage — the config was already correct
Worth recording, because the ticket's parent defect in
agent-assemblywas an uncovered directory and the same could have been true here. It is not: 0 uncovered, 0 dead patterns.npm12/12,pip18/18,gomod5/5 — 35 dependency-manifest directories, plus the repository root forgithub-actions, which is the 36 the gate reports..github/dependabot.ymlneeded no change — which is exactly why a gate is the deliverable rather than a config edit. Nothing held that property in place before this PR; a lockfile added tomorrow could have gone uncovered silently.What this PR does not do
maingreen. After thebrewfix, the live lane stays rc-gated on SDK/transport tickets outside this repo — AAASM-4447, AAASM-4467, AAASM-4468, AAASM-4469, AAASM-4446. Papering over that would violate this repo's Verification policy, so the lane is left failing at the condition it documents.maincarries 1 required review and zero required status checks, so this gate reports without blocking. That half is owner-gated and tracked on AAASM-5677.Reviewer note — three views of this PR's head disagree, and that is the ticket
Dispatching
verify-liveagainst this branch stamped its three rc-gated job results onto this PR's head commit. The result, on4d4d4d3, right now:gh pr checks 439Passed: 24, Failed: 0gh api commits/4d4d4d3/check-runs24 success, 3 failure, 1 skippedverify-liverun's own conclusionsuccessSame commit, three answers. The three failures are
live: node/go/pythonfrom run 31789721513 — my verification dispatch, not this PR's checks (verify-livehas nopull_requesttrigger) and not a regression from this diff. Each check that this PR actually triggers is green.This was not staged. It is the same disagreement AAASM-5675 describes on
main, reproduced by accident on a PR head — and a reasonable argument that "is this branch red?" should not depend on which API a reviewer happens to call.Related ticket
https://lightning-dust-mite.atlassian.net/browse/AAASM-5675
How to verify
The
dependabot coveragecheck run on this PR exercises the same two commands in CI.Checklist
[AAASM-XXXX] <GitEmoji> (<scope>): <summary>.envfiles committedREADME.mdwith prerequisites and run instructions