Phase 0: Add delta unit tests #51
No reviewers
Labels
No labels
bug
cli
core
docs
event
experiment
figure
invariant
metrics
oracle
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
provenance
revocation
tests
workload
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erikinkinen/AES!51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "0-graph-delta-format"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #9
Summary
This PR validates and extends the GraphDelta structure that tracks explicit changes to the authority graph during event application. It introduces comprehensive unit tests to ensure delta completeness and verifies full compliance with Phase 0 documentation requirements.
The GraphDelta structure already existed in
core/include/aes/core/graph_delta.hppbut lacked dedicated validation and testing. This PR confirms that:Scope
Included
tests/delta_tests.cpp): 15 tests covering all delta operationsdocs/model.mdanddocs/phase0.mdaes_delta_teststarget to build systemExplicitly excluded
Design intent
The GraphDelta structure serves as the explicit audit trail for all authority graph mutations. It enables:
Design decisions:
empty()method enables fast checks for no-op events (like UseCap in Phase 0)The implementation maintains strict alignment with event application semantics documented in
docs/model.md:Phase discipline
Phase 0 foundation
This PR is entirely within Phase 0 scope. GraphDelta:
Reserved fields for later phases
Per
docs/model.mdline 376, GraphDelta is identified as a future attachment point for:These fields are intentionally absent until their respective phases define the appropriate semantics.
Verification
docs/model.mdevent semantics (lines 144-361), atomic application discipline (lines 345-361), and invariant preservation (lines 443-608)aes_apply_event_testscontinue to pass with delta validationclang-formatand pre-commit hooksNotes
What reviewers should focus on:
tests/delta_tests.cppvalidates all event types and error conditions. Are there additional edge cases to consider?docs/model.md. Does the delta structure support the documented event semantics?Known limitations:
Follow-up work: