Skip to content

S1: selector-package remeasurement (design-only decision spike) #1557

Description

@thymikee

Named S1 to avoid overloading #1478 P6 / #1490 W3, which refer to platform modularity.

Question: after P5 (#1555), can a real selectors package eliminate BOTH the replay selector port's production adapter AND the in-memory fake adapter — without package cycles or root imports?

Why it exists: the P5 dual-adapter design deliberately duplicated selector semantics in the in-memory adapter (mini-grammar, deepest-then-smallest-area tiebreak, shared-ID demotion) to keep src/selectors root-owned. That was the right call under the locked W2 package plan, but it created a second selector engine that only stays honest through contract-suite coverage. The measured obstacles to relocation (from the P5 proposal, issue #1478 comments 5155937136/5156017698): the ~2.4k-LOC transitive closure (all of selectors + 3 snapshot files + utils), the selectors/build.ts → target-identity-node.ts back-edge (cycle risk against ad-replay), and 13 non-engine consumers incl. the public SDK facade.

Scope (read-only, design output only): remeasure the closure at post-P5 main; determine whether the back-edge dissolves now that identity vocabulary lives in packages/ad-script; map the SDK-facade and find/wait-landmark consumers; produce a GO/NO-GO recommendation with the migration plan and layering-rule deltas. Implement nothing without an explicit GO decision.

Sequencing: after #1555 merges and the façade-ratchet follow-up lands.

Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions