fix: require local-check artifacts to exist on disk - #34
Open
Frank-zhu0404 wants to merge 1 commit into
Open
Frank-zhu0404 wants to merge 1 commit into
Frank-zhu0404 wants to merge 1 commit into
Conversation
Validate that local_checks[].artifact paths resolve to retained regular files under the owning agent's artifacts directory when the CLI runs against a coverage ledger. Closes cloudflare#21.
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.
Summary
Closes #21.
validate-coverage-ledger.cjspreviously only checked thatlocal_checks[].artifactpaths were lexically owned (agents/<agent_id>/artifacts/...). Acovered/blocked/candidateunit could therefore pass while pointing at evidence that was never retained.This change makes the CLI resolve each local-check artifact against the ledger directory (
<output-dir>/coverage-ledger.json) and require that it:lstat, not a directory / FIFO / etc.)realpathThe same checks apply to archived
attempts[].local_checks[]. ProgrammaticvalidateDocument(ledger)without a base directory stays schema-only so existing in-memory unit tests keep working; passbaseDir(as the CLI does) to enable on-disk checks.Test plan
node --test skills/security-audit/validate-coverage-ledger.test.cjs(37 pass)node --test skills/security-audit/validate-findings.test.cjs(34 pass)$[0].local_checks[0].artifact: local check artifact does not existbaseDirbehavior