Skip to content

De-fork spike S1: baseline metrics + upstream-merge replay harness #1010

Description

@anandgupta42

Stage S1 of the de-fork spike (spec: docs/internal/2026-07-18-defork-spike-spec.md, Codex-consensus-approved rev 4).

Deliverables, all in script/upstream/:

  • taxonomy.ts — 3-bucket classification (upstream_shared / fork_owned / fork_added_outside_boundary) against the pinned v1.17.9 upstream tree, upstream-existence precedence, 10-path .opencode/ overlap pinned by a generated oracle test.
  • census.ts — stack-based marker-block parser, category table, versioned JSON envelope, --summary/--json/--check/--diff-budget modes; multiset ratchet with quantity-scoped committed exemptions.
  • divergence.ts — files/hunks/lines vs upstream base per bucket, pinned diff options.
  • replay.ts — explicit-base three-way merge via git merge-tree --write-tree --merge-base (no working-tree mutation), conflict taxonomy, census attribution with SHA-mismatch rejection. First real run vs v1.18.3.
  • Committed baselines + empty exemptions file + CI ratchet wiring into the existing marker-guard job.
  • Regenerated headline divergence numbers + feasibility-plan addendum.

Zero product-behavior risk (tooling/tests/CI only). Mergeability gates per spec §0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions