Skip to content

[Feature] Noēsis v1.0 Readiness — PR Checklist Epic #150

@saraeloop

Description

@saraeloop

Summary

Refresh of the runtime-hardening backlog so it reflects what is still open in the current repo, not work that has already landed.

Status

Already done

  • noesis ps remains episode/run-focused
  • noesis processes exists
  • noesis runs --process exists
  • process staleness is implemented and surfaced
  • concurrent run_index allocation is protected
  • fresh runs create canonical top-level .noesis/{episodes,index,processes}
  • .noesis/episodes/ is constrained to ep_* directories
  • summary.json includes structured process metadata
  • state.json includes structured process metadata
  • schema validation already exists for several emitted artifacts

Still open

  • finish canonical .noesis/ boundaries
  • finish process registry canonicalization
  • tighten emitted artifact/schema governance
  • finish dependency inversion in composition root
  • tighten ADR/documentation invariants

Remaining work

1. Fix canonical .noesis/ boundaries

  • move migration/debug markers out of .noesis/
  • align process storage to .noesis/processes/<process_id>/process.json
  • decide whether lock files belong in canonical runtime storage
  • keep .noesis/episodes/ evidence-only

Acceptance:

  • normal runs leave only canonical runtime artifacts under .noesis/
  • no migration/debug marker files remain in .noesis/
  • process records use canonical directory layout
  • episodes/ contains only ep_* directories

Tests:

  • extend layout migration tests
  • add regression for non-canonical files under .noesis/
  • add regression for canonical process directory layout

2. Finish process registry canonicalization

  • preserve monotonic run_index semantics through process-layout migration
  • make index/cache policy explicit and tested
  • make lock-file policy explicit and tested

Acceptance:

  • migrated and fresh process records behave identically
  • run_index remains monotonic after migration
  • registry behavior remains deterministic under concurrent writers

Tests:

  • migration test for flat-file process records to canonical process directories
  • concurrency regression on canonical process layout
  • resilience test for rebuild/index behavior after partial damage

3. Tighten emitted artifact/schema governance

  • add focused emitted state.json schema validation
  • remove drift between emitted state.json payload and checked-in state schema
  • clean up summary/state schema version discoverability
  • remove stale summary["status"] assumptions where current contract is outcome

Acceptance:

  • emitted summary.json validates against checked-in schema
  • emitted state.json validates against checked-in schema
  • docs/tests reflect the actual artifact contract
  • schema/version metadata is consistent enough for downstream consumers

Tests:

  • add tests/runtime/test_state_schema.py
  • tighten emitted summary schema validation coverage
  • add regression for stale top-level summary["status"] assumptions

4. Finish dependency inversion in composition root

  • remove direct concrete filesystem adapter instantiation from noesis/core.py
  • remove direct subprocess/tool runtime adapter instantiation from noesis/core.py
  • move runtime wiring into a composition root / builder layer
  • preserve port-oriented use case testing

Acceptance:

  • noesis/core.py is no longer directly wiring filesystem/tooling infrastructure
  • use cases remain unit-testable with fake ports
  • composition stays explicit and inspectable

Tests:

  • keep/add composition smoke test
  • keep/add port-isolation tests around runner/session wiring

5. Tighten ADR/documentation invariants

  • amend ADR-013 to clearly state current runtime invariants
  • state explicitly that final.json is the closure/seal predicate
  • state explicitly that events.jsonl is authoritative
  • state explicitly that summary.json and state.json are denormalized projections
  • remove phase-model/runtime-structure drift across public docs

Acceptance:

  • ADR-013 matches the runtime the code actually enforces
  • public docs do not contradict artifact/runtime semantics
  • first-time engineers can form the right mental model from docs alone

Removed from this issue

  • PR-005 — fix(cli): restore operator contracts (episodes vs processes)
  • the original “add staleness” portion of PR-004
  • the original “add concurrency-safe run_index allocation” portion of PR-004

Recommended priority

  1. refactor(core): finish dependency inversion in composition root
  2. fix(layout): finish canonical .noesis boundaries
  3. chore(schema): tighten emitted artifact/schema governance
  4. fix(process): finish process registry canonicalization
  5. docs(adr): tighten normative invariants

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions