M1 remediation handoff (EstateComparison architecture)¶
Issue: hector-sanchez-eu/conductor#3
Brief: brief.md
External review: review.md
Current implementation: draft PR branch codex/gate-c-discovery-scope
M1 status: verified
Latest external decision¶
- Gates A-D are approved and Gate D's candidate import is complete.
- The M1.5 real-estate pilot reviewed six Assets and six relationships.
- Live fresh-process retrieval passes physical validation and complete approved-scope
Notion/GitHub enumeration, but correctly returns
insufficient-context.
Governing instruction¶
External architectural recommendation: stop incremental bypass patching. Physical decoding, completeness, semantic assertions, and reuse decisions must not cross an open dictionary authority boundary.
Historical decision context¶
- Gate A: approved (originally design-only; Gate D subsequently authorized and completed mutation).
- Gate B: was
changes-requestedafter event-bound re-review of636f06d(payload not bound, overbroad classes, fakeevt.*, orphan batch escape, forgeable Boolean, repos/envs omitted).
Remediations in this pass¶
- Typed
EstateComparison— frozen dataclass with full decisive payload (claims polarity/text/citations, dispositions, no-gap, extend). Parsed from Decisions/Eventscomparison_payload+asserted_need/ claim/disposition IDs (estate_comparison.py). - Opaque
ExhaustiveSnapshot— adapter-seal factory only; Boolean/search_coverageexhaustiveness ignored. - Evaluator rewrite —
evaluate_reuseconsumes onlyEstateComparison+ExhaustiveSnapshot+ mapped Assets. Caller dictionaries never authorize. - Physical Decision/Event schema —
asserted_need,claim_ids,disposition_ids,comparison_payloaddocumented on Decisions/Events; comparison authority limited toestate-comparison/portfolio-disposition. - Global batch validation — all Assets/repos/envs/evidence/relationships/events (including orphans); no
evt.*prefix trust; duplicate index keys fail; relationhas_morefails closed. - Preparation path — queries repositories/environments; builds snapshot after batch validation; parses need-matching comparison events.
- Invariant test — mutating caller
search_coverage/ Boolean / raw events cannot change a decisive outcome.
Reproduction / invariant negatives¶
caller_dict_cannot_change_decisive_outcomereinterpreted_claim_payload_cannot_authorizeother_event_class_rejected_by_parserfake_event_extend_unresolvedorphan_batch_validation_catches_malformed_rowsexhaustive_snapshot_requires_adapter_seal
Deferred downstream execution¶
These are not M1 blockers:
- Unattended GitHub authentication is decided with the M3 runtime.
- Broad candidate triage is performed by the future preparation/review workflow, not manually before that workflow exists.
- A request-bound decisive EstateComparison and exhaustive snapshot are M4 golden-path evidence.
M1 independent verification passed at PR #14 head 5f738f9.
Validation¶
powershell
python -m pytest service/tests/test_read_adapters.py -q
python -m pytest service/tests -q
python -m mkdocs build --strict
Current result: 48 focused tests and 86 service tests pass; strict docs build passes.
Independent verification remediation¶
The first independent M1 verification found two blockers:
- comparison, batch, and caller-declared completeness could be issued independently and combined into a forged decisive result;
- the approved
gh-operatormode was documented but absent from the service adapter.
The current implementation binds an exhaustive snapshot to adapter-issued read
envelopes, the complete validated physical batch, its exact Decision/Event,
estate IDs, source completeness, request, and comparison digest. An unrelated
batch or free-form completeness input cannot issue a snapshot. A regression
fixture reproduces the forged parser/batch/snapshot chain and receives
insufficient-context.
GitHub reads now support bounded gh repo list calls for approved owners,
remove environment token variables from the subprocess, and disclose
auth-mode: gh-operator in provenance. Dedicated read tokens remain an
optional M3 unattended mode.
Independent re-verification returned VERIFIED. Evidence:
PR #14.