Commit Graph

2 Commits

Author SHA1 Message Date
0e83525305 fix(engineering): close Codex V1-A audit conditions (spec key + extra coverage)
Codex's audit of b575773 returned GO WITH CONDITIONS, all small.

P2 - Q-001 child shape now exposes the catalog-spec key.
engineering-query-catalog.md Q-001 specifies {id, type, name, status}.
Implementation now emits both `type` and `entity_type` with the same
value: spec compliance for new consumers, parity with the rest of the
queries module (which uses entity_type) for existing ones.

P2 - V1-A acceptance test now exercises Q-009 + Q-011 against the
already-seeded data. The seed had a flagged-assumption decision and
an unsupported validation claim but neither was being asserted; new
test pins risky_decisions() and unsupported_claims() against the
expected names.

P3 - /v1 alias coverage upgraded from OpenAPI presence to a real
GET /v1/entities/Subsystem/{id}?expand=contains assertion. Catches
route-copy or ordering regressions, not just spec drift.

P3 - new test pins two intended Q-001 behaviors that aren't obvious
from the data shape: child *Subsystems* surface in `contains` (the
impl walks part_of irrespective of child entity_type), and inactive
children are filtered out (uses invalidate_active_entity to seed).

Tests: 602 -> 605 (+3). New count on branch: 9 V1-A tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 13:00:56 -04:00
b57577352d feat(engineering): V1-A — Q-001 subsystem-scoped + pillar query integration
Per docs/plans/engineering-v1-completion-plan.md Phase V1-A. Scope is
deliberately tight: a single shape fix on Q-001 and an integration test
that proves the four pillar queries (Q-001 subsystem-scoped, Q-005,
Q-006, Q-017) work end-to-end against one seed graph on
p05-interferometer.

The shape fix:
  - New subsystem_contents() in src/atocore/engineering/queries.py.
    Returns {subsystem, contains: [{id, entity_type, name, status}]}
    by walking inbound part_of edges (the inverse of CONTAINS), filtered
    to active children.
  - New route GET /entities/Subsystem/{subsystem_id}?expand=contains
    matching the spec invocation in
    docs/architecture/engineering-query-catalog.md Q-001 verbatim.
    400 on unsupported expand value, 404 on missing/wrong-type id.
  - Aliased under /v1.

The existing project-wide /engineering/projects/{name}/systems route
stays as-is for Q-004 (full project tree). The two queries answer
different operator questions and both belong in V1.

V1-A acceptance test (test_v1a_pillar_queries_run_end_to_end_against_
single_seed):
  - Q-001 subsystem-scoped: Optics returns Primary Mirror + Diverger Lens
  - Q-005 requirements_for: Primary Mirror has its single satisfied req
  - Q-006 orphan_requirements: the orphan surfaces, the satisfied does not
  - Q-017 evidence_chain: supported claim has FEA result via 'supports';
    unsupported claim has no 'supports' edge

If this single test fails, V1-A is not done.

Tests: 596 -> 602 (+6). Per the plan: "~4 tests"; the +2 are basic
helper-function negatives (missing id, wrong type) kept separate from
the route and integration tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 12:54:12 -04:00