Phase 0: Metrics framework #60
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!60
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "0-metrics-framework"
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 Metrics Framework v0 for
#19by adding a dedicatedmetricsmodule with snapshot-pure metric computation and a CLI runner that computes metrics from authoritative event history via replay.Closes #19.
What’s Included
metrics/module andaes_metricslibrary target.add_subdirectory(metrics).MetricsReportV0API with:metrics_v(fixed0)total_capscaps_per_subject(sparse, deterministic map)caps_per_object(sparse, deterministic map)compute_metrics_v0(const sim::Engine&):Errc::InvariantViolationon invalid snapshots.encode_metrics_report_json_v0(...):run_metrics_from_event_log_jsonl_v0(path):io::replay_event_log_jsonl.aes_metrics:aes_metrics <event_log_path>2on bad args.1on processing failure (code + messageto stderr).0on success (JSON + trailing newline to stdout).Output Schema
Runner emits one minified JSON object:
metrics_vtotal_capscaps_per_subjectas[{ "id": <u64>, "count": <u64> }]caps_per_objectas[{ "id": <u64>, "count": <u64> }]Tests Added
metrics_api_tests(API/interface smoke)metrics_tests(correctness, sparse behavior, invariant guard, determinism, empty-right edge counting)metrics_runner_tests(runner success/error paths, CLI usage/error codes, deterministic output shape)Validation
cmake --build _buildctest --test-dir _build --output-on-failureAll tests pass (
29/29).