Skip to content

conformance: reject duplicate evidence ids - #27

Merged
new-world-coder merged 1 commit into
new-world-coder:cursor/aegisproof-v0.1-spec-and-clifrom
team-humaki:conformance-invalid-duplicate-id
Sep 22, 2026
Merged

new-world-coder merged 1 commit into
new-world-coder:cursor/aegisproof-v0.1-spec-and-clifrom
team-humaki:conformance-invalid-duplicate-id

Conversation

@team-humaki

Copy link
Copy Markdown
Contributor

Fixes #14.

Adds conformance/v0.1/invalid/duplicate-id for the SPEC §4.3 / §7 rule that evidence id values must be unique. Two items share id: a with otherwise valid locators and digests; aegisproof verify reports INVALID / SCHEMA and exits 1.

Also covers the fixture from internal/verify so the path cannot rot.

go test ./internal/verify
go run ./cmd/aegisproof verify ./conformance/v0.1/invalid/duplicate-id; echo $?

Add invalid/duplicate-id so verify fails SCHEMA when two items share an id, matching SPEC §4.3 uniqueness.

Fixes new-world-coder#14

Signed-off-by: Team Humaki <team@humaki.com>

@new-world-coder new-world-coder left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Validation vs issue #14 + contribution rules

Looks good — this is a clean first contribution.

Check Status
Issue #14: fixture under conformance/v0.1/invalid/ ✅ invalid/duplicate-id
Issue #14: README row ✅
Issue #14: verify exits 1 ✅ (INVALID / SCHEMA)
SPEC §4.3 / §7 uniqueness ✅ exercised correctly
DCO (Signed-off-by) ✅
Scope (no LLM/cloud/compliance verdict language) ✅
Digests match file bytes ✅
Local go test ./... ✅
GitHub Actions CI (after first-time fork approval) ✅

Extra credit beyond the issue acceptance criteria: the in-package unit test + conformance path test is exactly the right hardening so the fixture cannot rot.

Non-blocking follow-ups (maintainer or optional follow-on PR)

  1. .github/workflows/ci.yml still only smoke-checks bad-digest and path-traversal under “Conformance invalid must fail”. Worth adding duplicate-id (and eventually the other invalid fixtures) so CI mirrors the README table — not a blocker since go test already covers this case.
  2. Optional: assert SCHEMA + the duplicate-id message in TestConformanceInvalidDuplicateID the same way TestDuplicateEvidenceID already does.

Welcome — and thank you for being AegisProof’s first external contributor. 🙌

if verify.ExitCode(rep.Result) != 1 {
t.Fatalf("want exit 1 got %d", verify.ExitCode(rep.Result))
}
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Nit (non-blocking): identical file bytes + identical digests correctly isolate the failure to duplicate id (not digest). Nice choice.

Optional hardening for this test only: also assert a SCHEMA error mentioning duplicate evidence id, matching TestDuplicateEvidenceID above — so a future regression that fails for the wrong reason still fails the test.

@new-world-coder
new-world-coder merged commit e45e02f into new-world-coder:cursor/aegisproof-v0.1-spec-and-cli Sep 22, 2026
1 check passed
new-world-coder added a commit that referenced this pull request Sep 22, 2026
Cover every invalid README case (including duplicate-id from #27) and run CI on the active development branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
@new-world-coder

Copy link
Copy Markdown
Owner

Thank you for AegisProof’s first external contribution — and for going beyond the issue with the unit + conformance path tests so the fixture can’t rot. Welcome, and we hope you’ll stick around for more good-first-issue work when you’re free.

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.

Add invalid conformance fixture (good first issue)

2 participants