Skip to content

chore: 141 - Log capability advertisement#252

Merged
Exohayvan merged 1 commit into
mainfrom
ai/roadmap-step-1-141-20260715-094946
Jul 16, 2026
Merged

chore: 141 - Log capability advertisement#252
Exohayvan merged 1 commit into
mainfrom
ai/roadmap-step-1-141-20260715-094946

Conversation

@Exohayvan

Copy link
Copy Markdown
Contributor

Roadmap step

phase-1/step-141: Step 141 - Log capability advertisement

Objective

Complete the selected roadmap step using only the programmatically selected step details.

Selected step

# Step 141 - Log capability advertisement

## Source Checklist Item
- [ ] Log capability advertisement.

## Goal
Record every local capability advertisement as an append-only audit event so the prototype can prove what a node claimed it could do, when it claimed it, and which manifest, creator node ID, validation state, lineage, and contribution context were attached. This step only covers local audit logging for advertisements; it does not add networking, scoring, tokenomics, dashboards, or production trust claims.

## Implementation Checklist
- [ ] Define a local audit event type for capability advertisement with a stable event name, timestamp, creator node ID, node ID, capability ID, manifest digest, advertisement payload digest, validation receipt references, lineage references, and contribution attribution fields.
- [ ] Emit the audit event whenever a capability advertisement is created, refreshed, or replaced.
- [ ] Store the event in the existing local audit log path using append-only behavior and deterministic JSON serialization where practical.
- [ ] Ensure sensitive runtime data is not logged unless already part of the intended local manifest or validation receipt.
- [ ] Include enough fields to reconstruct which local manifest and validation evidence supported the advertised capability.

## Required Tests Or Verification
- [ ] Create a sample capability advertisement and confirm exactly one matching audit event is appended.
- [ ] Verify the log entry includes creator node ID, capability ID, manifest digest, validation receipt references, lineage references, and contribution attribution.
- [ ] Refresh or replace the advertisement and confirm a new audit event is appended without mutating the prior event.
- [ ] Verify malformed or rejected advertisements do not produce successful advertisement audit events.

## Risks
- [ ] Audit logs may become misleading if they omit manifest digests or validation receipt references.
- [ ] Logging full payloads may leak local-only details or make receipts harder to compare.
- [ ] Overwriting prior entries would break lineage and attribution review.

## Done When
- [ ] Capability advertisement actions produce local append-only audit events with creator identity, manifest linkage, validation evidence, lineage, and attribution preserved.
- [ ] Tests prove the audit log can distinguish created, refreshed, replaced, and rejected advertisement attempts.

Changes

869adf0 chore: complete phase-1 step-141
 docs/local-audit-event-schema.md         |  8 +++-
 src/aethermesh_core/local_audit_event.py | 58 ++++++++++++++++++++++++
 src/aethermesh_core/local_startup.py     | 76 ++++++++++++++++++++++++++++++++
 tests/test_local_audit_event.py          |  2 +-
 tests/test_local_shutdown.py             | 25 +++++++++--
 tests/test_local_startup.py              | 72 ++++++++++++++++++++++++++++++
 6 files changed, 235 insertions(+), 6 deletions(-)

Validation

  • PYTHONDONTWRITEBYTECODE=1 python3 scripts/full_test.py --mode fast --base origin/main --keep-going

Safety notes

  • Roadmap selection was performed by the Python loop, not by the AI agent.
  • No force push used.
  • No hard reset used.
  • Local automation paths are intentionally omitted.

@Exohayvan Exohayvan added area:audit-log Area: generated triage label for audit log. priority:P3 Priority P3: normal planned work. risk:medium Risk: changes existing working behavior with moderate regression risk. system:runtime System: local node runtime/service lifecycle. type:maintenance Type: maintenance, cleanup, refactor, or dependency work. labels Jul 15, 2026
@Exohayvan
Exohayvan merged commit b755f3c into main Jul 16, 2026
44 checks passed
@Exohayvan
Exohayvan deleted the ai/roadmap-step-1-141-20260715-094946 branch July 16, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:audit-log Area: generated triage label for audit log. priority:P3 Priority P3: normal planned work. risk:medium Risk: changes existing working behavior with moderate regression risk. system:runtime System: local node runtime/service lifecycle. type:maintenance Type: maintenance, cleanup, refactor, or dependency work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant