Skip to content

chore: 142 - Log job submission#253

Merged
Exohayvan merged 2 commits into
mainfrom
ai/roadmap-step-1-142-20260716-004051
Jul 16, 2026
Merged

chore: 142 - Log job submission#253
Exohayvan merged 2 commits into
mainfrom
ai/roadmap-step-1-142-20260716-004051

Conversation

@Exohayvan

Copy link
Copy Markdown
Contributor

Roadmap step

phase-1/step-142: Step 142 - Log job submission

Objective

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

Selected step

# Step 142 - Log job submission

## Source Checklist Item
- [ ] Log job submission.

## Goal
Create a local-first audit log entry whenever a job is submitted. The log must make the submission traceable without claiming network consensus or production-grade decentralization. Each entry should preserve the submitting creator node ID, job manifest reference, validation expectations, lineage pointer, and initial contribution attribution so later receipts can connect back to the original submission.

## Implementation Checklist
- [ ] Add a job-submission audit event emitted at the same boundary where a local job is accepted.
- [ ] Include stable fields for event type, timestamp, local node ID, creator node ID, job ID, manifest hash or path, parent lineage reference if present, and attribution metadata.
- [ ] Write the event to an append-only local audit log format that is easy to inspect and safe to parse.
- [ ] Ensure the audit write happens before the job is marked ready for execution.
- [ ] Return a clear local error if the audit event cannot be written, instead of silently accepting the job.
- [ ] Avoid logging secrets, private prompt content, credentials, or large payload bodies.

## Required Tests Or Verification
- [ ] Submit a valid local job and verify exactly one job-submission audit entry is appended.
- [ ] Confirm the entry contains creator node ID, job ID, manifest reference, lineage reference, validation metadata, and attribution metadata.
- [ ] Simulate an audit-log write failure and verify the job is not accepted.
- [ ] Verify repeated submissions create distinct entries without overwriting prior audit history.

## Risks
- [ ] Audit logs may leak sensitive payload details if fields are not constrained.
- [ ] Missing lineage or attribution fields can break later contribution validation.
- [ ] Accepting jobs when audit writes fail creates unverifiable local state.

## Done When
- [ ] Every accepted local job submission creates a durable audit entry.
- [ ] Failed audit logging prevents job acceptance with a clear error.
- [ ] Tests prove submission audit entries are complete, append-only, and locally inspectable.

Changes

1705d6e chore: complete phase-1 step-142
 docs/local-audit-event-schema.md         |  6 ++-
 src/aethermesh_core/local_audit_event.py | 45 ++++++++++++++++++
 src/aethermesh_core/runtime_service.py   | 61 ++++++++++++++++++++++++
 tests/test_local_audit_event.py          | 26 ++++++++++-
 tests/test_runtime_service_api_cli.py    | 80 ++++++++++++++++++++++++++++++++
 5 files changed, 216 insertions(+), 2 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:high Risk: changes critical working behavior or release/runtime paths. system:runtime System: local node runtime/service lifecycle. type:maintenance Type: maintenance, cleanup, refactor, or dependency work. labels Jul 16, 2026
@Exohayvan
Exohayvan merged commit 5bd14b5 into main Jul 16, 2026
23 checks passed
@Exohayvan
Exohayvan deleted the ai/roadmap-step-1-142-20260716-004051 branch July 16, 2026 08:26
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:high Risk: changes critical working behavior or release/runtime paths. 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