Phase 1: Capability use semantics #65
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!65
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "1-capability-use-semantics"
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?
Summary
Implements Capability Use Semantics v1 for
#25by makingUseCapan explicit rights-checked attempt, persisting deterministic allow/deny reasons in the event log, and adding focused coverage for invalid and insufficient-rights paths.Closes #25.
What Changed
1) Make
UseCapexplicit with rights checkingUseCapPayloadnow requiresrequired_rights(not justedge).UseCapOutcomeReason:OkMissingEdgeInsufficientRightsUseCapOutcome { bool allowed; UseCapOutcomeReason reason; }.ApplyEventResultwithstd::optional<UseCapOutcome> use_cap_outcome.apply_event:edge==0or emptyrequired_rights) => hardErrc::InvalidArgument.UseCapremains graph-non-mutating in all outcomes.UseCappayload callsites and event/snapshot equality helpers accordingly.UseCapbehavior.2) Add event log v1 use outcome reasons
EventLogResultV1and optionalEventLogRecord::result_v1.encode_event_log_record_jsonl(...)decode_event_log_record_jsonl(...){"v":1,"t":...,"event":...,"delta":...,"result":{"ok":<bool>,"reason":"<enum>"}}okmissing_edgeinsufficient_rightsok/reasonconsistency during encode/decode.JsonlEventLogWriter::appendto version-dispatch encoding.read_event_log_jsonlto accept v0 + v1 and validate:resultaes simulateoutput to emitv=1records and populateresult_v1for every event.3) Add tests for invalid and insufficient-rights use
apply_eventtests for:resultv=1and includeresult.Commits
Phase 1: Make UseCap explicit with rights checking (#25)Phase 1: Add event log v1 use outcome reasons (#25)Phase 1: Add UseCap invalid and insufficient-rights tests (#25)Compatibility Notes
UseCapPayloadnow needsrequired_rights.Validation
cmake --build _buildctest --test-dir _build --output-on-failure