Skip to content

fix(depgraph): expose incomplete impact attribution and dynamic dependents #4049

Closed

Description

@thymikee

Parent: #4045

Purpose

affected snapshot-route.ts returns commands:[] and liveOwners:[] because injected bindDevice calls have no import edge. Value-only reverse reachability also stops at dynamic imports, so output can look complete while impact is unknown.

Owner and scope

scripts/depgraph/affected.ts, affected-run.ts, adjacent tests and README. Reuse existing layering graph and ownership declarations.

Required behavior

Keep value-dependent semantics explicit. Add separately named executable/dynamic reverse reachability without conflating it with type reachability. Mark command/live attribution as partial where injection makes import reachability incomplete; use existing declaration facts, not a second inferred call graph or handwritten platform ownership list. Empty static reachability must not imply no affected command/device work. Do not change gate selection as part of this issue. commandsReaching already includes value and dynamic imports; do not claim or fix a dynamic gap there. The added transitive dynamic/executable field belongs to reverse dependents. Inspect scripts/layering/daemon-platform-runtime-inventory.ts for existing injection declarations; if those cannot support exhaustive attribution, report globally partial static attribution rather than invent a new platform list.

API or evidence example

Illustrative: commandAttribution: {kind:'partial', reason:'injected-runtime'}, commands:[...staticallyReachable]; separate executableDependents from existing value dependents.

Observable completion

  • Actual snapshot-route query explicitly discloses incomplete command attribution.
  • A fixture whose reverse path crosses a dynamic import reports that dependency in the correctly labelled field.
  • Text and JSON agree and preserve bounded counts; tests distinguish known empty from incomplete attribution.
  • No claim that reachability means removable imports or complete coverage.

Dependencies and sequencing

Blocked by: none.

Validation

pnpm depgraph:test, actual affected queries for platform and ordinary non-injected files, documentation checks and exact-head affected gate. Preserve existing graph model.

Base audit SHA: 144bd59890277fd4717995588ad817597c9d6552. Re-read the issue and all Decision: comments before work. Read applicable AGENTS.md routes. Keep one owner boundary per PR. Independent review and serialized exact-head validation are coordinated by the umbrella orchestrator.

Activity

  1. added
    bug
    needs-triage
    and removed
    needs-triage
    on Oct 29, 2026
  2. added
    in-progress
    and removed on Oct 29, 2026
  3. thymikee commented on Oct 29, 2026

    @thymikee
    MemberAuthor

    Implementation committed at 74ff5d0 against audit base 144bd59. Worker reports focused tests, typecheck and OXC format passed. No implementation PR is published. Independent review and orchestrator-scheduled exact-head validation remain outstanding.

  4. thymikee commented on Oct 29, 2026

    @thymikee
    MemberAuthor

    Decision: attribution completeness: Accept the review finding that command-runtime createCommandSurface is another unrecorded injection boundary outside the R76 family. The shared import model cannot prove exhaustive attribution, so mark all command/live-owner lists partial with reason injected-calls-not-modeled. Remove the R76-only completeness classifier instead of adding an injection-owner list. Value-only gate selection remains unchanged. Add an actual CLI text/JSON agreement and dynamic-list truncation check, and cover the command-surface sibling boundary.

  5. thymikee commented on Oct 29, 2026

    @thymikee
    MemberAuthor

    Current state: independent Sonnet recheck at 1a85e11172 returned no required findings. Parent incorporated optional clarifications that executable import reachability includes value and dynamic edges, and compared both direct/transitive dependent counts between actual CLI text and JSON. Local head 26301bb2fa: 47 depgraph tests, lint, typecheck and full format passed. Exact-head affected validation remains pending.

  6. thymikee commented on Oct 29, 2026

    @thymikee
    MemberAuthor

    Current state: exact-head affected validation at 26301bb2fad57cbd73ee9817895f5b1a80357f00 failed only provider integration: simulator recording ios-record-trace.test.ts:66 timed out at5000ms;221tests passed /1failed over67files. All prior runnable stages passed, including format/lint/typecheck/layering/DI seams/Fallow/native-dupe checks/build/package/Node integration/macOS coverage/related tests/full unit. Receipt run-EZdtMu has exactCommit:true.

    Fresh unchanged base144bd59890, frozen install/build, identical command pnpm run test:integration:provider and default worker limit reproduced the same sole test/location/5000ms timeout:221passed /1failed. The disposable base checkout was removed. Attribution is base-blocked by #4060; #4065 contains the recording fix, but is unmerged. No gate reduction, retries or deadline change. Independent Sonnet recheck had no required findings;47graph/CLI tests plus CLI text/JSON counts and truncation passed. Publish B1 as draft with current-head CI obligations, not a passed full gate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugin-progress

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions