Skip to content

chore: 20 - Validate runtime configuration before the node starts#116

Merged
Exohayvan merged 13 commits into
mainfrom
ai/roadmap-step-1-20-20260710-111405
Jul 10, 2026
Merged

chore: 20 - Validate runtime configuration before the node starts#116
Exohayvan merged 13 commits into
mainfrom
ai/roadmap-step-1-20-20260710-111405

Conversation

@Exohayvan

Copy link
Copy Markdown
Contributor

Roadmap step

phase-1/step-20: Step 20 - Validate runtime configuration before the node starts

Objective

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

Selected step

# Step 20 - Validate runtime configuration before the node starts

## Source Checklist Item
- [ ] Validate runtime configuration before the node starts.

## Goal
Ensure the local node refuses to start when required runtime configuration is missing, malformed, unsafe, or inconsistent with preserved local identity and manifest data. Validation should happen before any work execution, receipt writing, routing, or contribution attribution so bad configuration cannot create misleading lineage or invalid node output.

## Implementation Checklist
- [ ] Define the required runtime configuration fields for the local prototype, including node identity path, manifest path, receipt/output paths, work directory, and local runtime mode.
- [ ] Add a pre-start configuration validation step that runs before node initialization or work execution.
- [ ] Validate that the creator node ID exists, is readable, and is not regenerated during startup.
- [ ] Validate that required manifests exist, parse correctly, and match the expected local prototype schema.
- [ ] Validate output directories for receipts, lineage records, and contribution attribution are present or can be created safely.
- [ ] Reject configuration that would overwrite existing identity, manifests, receipts, lineage, or attribution records without an explicit safe migration path.
- [ ] Return clear, local-readable errors that explain which field failed and how to fix it.

## Required Tests Or Verification
- [ ] Start with a valid local configuration and confirm the node reaches the normal startup path.
- [ ] Start with each required field missing and confirm startup fails before node execution.
- [ ] Start with malformed manifest content and confirm no receipts or lineage records are written.
- [ ] Start with an existing creator node ID and confirm it is preserved unchanged.

## Risks
- [ ] Validation may become too permissive and allow invalid lineage or attribution data.
- [ ] Validation may become too strict and block legitimate local test setups.
- [ ] Error messages may expose sensitive local paths or internal details unnecessarily.

## Done When
- [ ] The node performs deterministic runtime configuration validation before startup.
- [ ] Invalid configuration blocks execution before any work, receipt, lineage, or attribution write occurs.
- [ ] Valid configuration preserves creator node ID, manifests, validation receipts, lineage, and contribution attribution.

Changes

43b2541 chore: complete phase-1 step-20
 src/aethermesh_core/local_runtime_config.py | 39 +++++++++++++++++
 tests/test_local_startup.py                 | 67 ++++++++++++++++++++++++-----
 2 files changed, 96 insertions(+), 10 deletions(-)

Validation

  • PYTHONDONTWRITEBYTECODE=1 python 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

Copy link
Copy Markdown
Contributor Author

Automated review marked this PR fixable on the final allowed pass and pushed fixes. The loop is leaving it open for another review cycle instead of closing repaired work.

@Exohayvan Exohayvan added area:runtime-config Area: generated triage label for runtime config. priority:P2 Priority P2: high-impact near-term 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 10, 2026
@Exohayvan

Copy link
Copy Markdown
Contributor Author

Automated review marked this PR fixable on the final allowed pass and pushed fixes. The loop is leaving it open for another review cycle instead of closing repaired work.

@Exohayvan

Copy link
Copy Markdown
Contributor Author

Automated review marked this PR fixable on the final allowed pass and pushed fixes. The loop is leaving it open for another review cycle instead of closing repaired work.

@Exohayvan

Copy link
Copy Markdown
Contributor Author

Automated review marked this PR fixable on the final allowed pass and pushed fixes. The loop is leaving it open for another review cycle instead of closing repaired work.

@Exohayvan Exohayvan merged commit 05281e9 into main Jul 10, 2026
23 checks passed
@Exohayvan Exohayvan deleted the ai/roadmap-step-1-20-20260710-111405 branch July 10, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:runtime-config Area: generated triage label for runtime config. priority:P2 Priority P2: high-impact near-term 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