oc_chat
Loading...
Searching...
No Matches
seed_142_fix_dependency_directions Namespace Reference

Variables

dict FIXES

Detailed Description

Dependency-direction corrections (Plan 142 prose-preservation Phase 4, GATE4 Part A).

Purpose
-------
The proper render exposed INVERTED ``depends_on`` edges in the P1.7-ingested seed
(a dependent "blocked by" a *later / not-started* predecessor โ€” chronologically
impossible). This tool FIXES the clearly-inverted edges (each evidence-backed,
see ``tools/142_dependency_direction_audit.md``); the genuinely-ambiguous ones are
left untouched and FLAGGED in the audit for an operator decision.

The final, operator-confirmed edge set (GATE4 direction fixes + the GATE4 ADDENDUM
cleanup bundle). ``FIXES`` re-points ``depends_on``; ``STATUS_FIXES`` corrects a
stale status:
- ``M2.depends_on -> [M1]``     (was [M3,M7.4] inverted; + legacy "M2 Depends on: M1").
- ``M3.depends_on -> [M2]`` RETIRED at Plan 151 T0 (operator M2->M3 gate waiver).
- ``M7.depends_on -> [M2, M5]`` (legacy "M7 Depends on: M2 + M5"; M7.4 nested -> phase-level).
- ``G.4a.depends_on -> []`` + ``G.5a.depends_on -> [G.4a]`` (inverted vs G.5a's prose).
- ``B.depends_on -> []`` ยท ``C.depends_on -> []`` ยท ``M11-GATE.depends_on -> []``
  (3 spurious chronologically-impossible edges removed).
- ``M11-GATE.status blocked -> done`` (legacy shows M11-GATE โœ… done at Round 24).

Edge ``kind`` stays ``gates`` (``gates``/``blocks`` render identically as a ๐Ÿ”’
blocker). No item is added or removed (fidelity preserved); only ``depends_on`` +
the one status are re-pointed. Deterministic + idempotent.

Responsibilities
----------------
- ``apply(source_dir)`` โ€” load each affected record, re-point ``depends_on``,
  re-emit canonically; ``FIXES`` is the declarative edit set.

Diagnostics
-----------
Domain: OC_CHAT.MAIN
Levels:
    L2 - fix lifecycle
    L3 - per-record edit
    L4 - per-edge detail

Contracts
---------
- Deterministic + idempotent; writes only the 5 affected ``source`` records;
  never touches the live legacy roadmap; every record re-validates + canonicalises.

Dependencies
------------
- oc_diagnostics (structured debug logging via _dbg)
- oc_chat.registry.regenerate (imported for the contracts bootstrap it runs)
- option_c_registry_contracts (DependencyEdge - the corrected depends_on edges)
- oc_chat.registry.source.canonical (load_record and format_record_text - reads each affected record and re-emits it canonically)
- oc_chat.registry.source.scanner (scan_source_tree - finds the phase and roadmap item records by stem)

Variable Documentation

◆ FIXES

dict seed_142_fix_dependency_directions.FIXES
Initial value:
1= {
2 "M2": ["M1"], # was [M3, M7.4] inverted; + legacy "M2 Depends on: M1" (addendum)
3 # "M3": ["M2"] RETIRED (Plan 151 T0, 2026-07-16): the operator-ratified
4 # M2->M3 gate WAIVER (151 dispatch pin, branch A; waiver record
5 # 2026-07-16-151-t0-m2-m3-gate-waiver) removed M3's depends_on gate so the # migration could start with M2 non-terminal. Re-adding the edge here made # this one-shot fixer NON-idempotent against the committed seed (it # re-locked M3 on every run โ€” caught at 151 T2 when the suite mutated the # working tree). The 142-era evidence for the other edges is unchanged. "M7": ["M2", "M5"], # legacy "M7 Depends on: M2 + M5" (M7.4 nested -> phase-level; +M5 addendum) "G.4a": [], # was [G.5a] โ€” inverted vs G.5a's own prose
6 "G.5a": ["G.4a"], # G.5a body: "Depends on G.4a cleanup"
7 "B": [], # drop spurious B<-M11 (chronologically impossible, no prose link)
8 "C": [], # drop spurious C<-G.5a + C<-M11 (same)
9 "M11-GATE": [], # drop spurious M11-GATE<-M11 (it ran mid-M11, never blocked-on-complete-M11)
10}

Definition at line 80 of file seed_142_fix_dependency_directions.py.