Repository navigation
spec(normative): req-lk-015 anchors git-source integrity on content_hash (#4092) - #4285
Conversation
…ash (#4092) Amendment 0.1.71 re-anchors req-lk-015: every git-sourced lock entry records content_hash, a sha256 envelope over the package tree; frozen install and apm audit recompute it and fail closed naming the entry, the expected and the observed envelope. The canonical tree_sha256 is reserved for v0.2. The field table, editorial note, Section 7.5 replay prose and informative examples are aligned; schema bytes are unchanged. Part of #4092 Co-authored-by: copilot-swe-agent[bot] <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
The normative integrity-anchor amendment relies on a steward ruling and adoption authority that the retrieved #4092 comments do not substantiate, requiring human confirmation.
No open issues 🎉
What changed in this PR
Re-lands OpenAPM amendment 0.1.71, making content_hash the v0.1 integrity anchor for git-sourced lock entries and reserving tree_sha256 for v0.2.
Changes:
- Revises
req-lk-015to require recordingcontent_hashand verifying it during frozen installs andapm audit, with fail-closed mismatch diagnostics. - Aligns the field table, replay guidance, examples, and amendment history without changing schemas,
lockfile_version, or the requirement count. - Updates the requirements manifest and extends spec-text assertions to pin the revised wording.
| File | Description |
|---|---|
tests/spec_conformance/test_lockfile_reqs.py |
Adds assertions for the revised integrity requirement and v0.2 reservation. |
docs/src/content/docs/specs/openapm-v0.1.md |
Revises the normative requirement and aligns supporting prose, examples, and history. |
docs/public/specs/manifests/openapm-v0.1.requirements.yml |
Records amendment 0.1.71 in the req-lk-015 notes. |
Review effort: Balanced
Krish Khinchi (krishkhinchi)
left a comment
There was a problem hiding this comment.
The content_hash re-anchoring is consistent across the specification, field table, replay requirements, and lockfile examples. However, there are two areas worth tightening:
tests/spec_conformance/test_lockfile_reqs.py:470-478: The test is still namedtest_lockfile_tree_sha256_canonicalisation_invariant, although it now validatescontent_hashas the v0.1 integrity anchor. Rename it to reflect the actual requirement and avoid misleading future maintainers.- Steward ruling and adoption traceability: The amendment is marked adopted through an editor decision without the Section 9.3 reviewer-panel approval or public comment period. Since this changes a normative requirement, ensure the referenced steward ruling and human scope approval are independently verifiable in #4092 rather than relying solely on the PR description.
The specification changes are otherwise well aligned, and keeping the schema bytes and lockfile_version unchanged is appropriate for this amendment. Recommendation: Approve, with a follow-up to improve test naming and verify the amendment's governance record.
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Description
This amendment was added to #4236 after Lane L had merged that PR, so it never reached
main; this PR re-lands it. It adopts amendment 0.1.71, which revisesreq-lk-015in place per the steward ruling:content_hash, asha256envelope over the package tree (byte stream perreq-lk-016).apm auditMUST recompute it atresolved_commitand fail closed, with a diagnostic naming the entry, the expected envelope and the observed envelope.tree_sha256and its Section 5.6.4 byte representation are reserved for v0.2.content_hashis required for git entries;tree_sha256is reserved), the Section 5.6.4 editorial note, the Section 7.5 replay prose, and the informative lockfile examples (nowcontent_hash).lockfile_versionare unchanged; the count stays 149 (144 MUST, 5 SHOULD).req-lk-015conformance test pins the new text, and the manifest gains a note. CONFORMANCE has no diff.Issue and approved scope
Issue: Refs #4092 (Part of #4092)
Human scope-approval comment: the steward ruling on #4092, relayed by the 0.37 Stream H lead.
Does this PR complete the issue, or what remains? It completes the req-lk-015 part of #4092's spec-conformance linking.
Type of change
Testing
pytest tests/spec_conformance --collect-only(683 collected),gen_statement(no diff),orphan_check(OK) and ruff. CI validates the rest.req-lk-015assertions are extended.Changelog
Spec conformance (OpenAPM v0.1)
docs/src/content/docs/specs/openapm-v0.1.md(req-lk-015prose in place, Sections 5.2, 5.6.4 and 7.5, examples, Appendix D).docs/public/specs/manifests/openapm-v0.1.requirements.yml(req-lk-015note).@pytest.mark.req("req-lk-015")intests/spec_conformance/test_lockfile_reqs.pyis extended.CONFORMANCE.{md,json}regenerated; no changes.