Skip to content

Map exact c8 TypeScript if arms to EtsIR coverage - #409

Draft
CaelmBleidd wants to merge 1 commit into
caelmbleidd/iccq-runtime-limitationsfrom
caelmbleidd/pbt-382-branch-feedback
Draft

CaelmBleidd wants to merge 1 commit into
caelmbleidd/iccq-runtime-limitationsfrom
caelmbleidd/pbt-382-branch-feedback

Conversation

@CaelmBleidd

@CaelmBleidd CaelmBleidd commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Pinned c8 produces independent one-arm Istanbul records, which cannot identify a TypeScript if or its true/false CFG successors. This change reconstructs ordered arms from the same concrete run only when TypeScript AST spans, exact source-map round trips, and V8 counters agree. Unsupported or ambiguous cases retain statement hits and are reported separately.

  • Keep c8 as the statement/function coverage source and execute each property once.
  • Require true/false counters to add up to the condition count. For if without else, require a single terminating true arm and an observable following false successor.
  • Reject ambiguous mappings, repeated control flow, throwing conditions, duplicate scripts, changed source snapshots, and missing successors. Preserve original condition spans for nested EtsIR mappings.
  • Pin TypeScript 5.9.2 and trace-mapping 0.3.31, and reuse the bounded process supervisor for conversion.

This branch now builds on #394 so Calls and PBT share the existing runtime models, source closure handling, and this coverage implementation. Both coverage-branches and local-source-closure Node test suites remain enabled. Review order: #391 → #410 → #394 → this PR → #412 (shared engine infrastructure).

Validation of the combined stack (local JDK 21, composite JacoDB tree identical to merged UnitTestBot/jacodb#367):

  • 73 Node adapter tests passed, including both suites above.
  • All 9 FastCheckCoverageTest tests passed, including exact source-to-EtsIR branch mapping and nested conditions.
  • FastCheck and PBT Detekt main/test passed with no findings.
  • git diff --check passed. The adapter dependency/converter files are unchanged from the previously validated implementation apart from retaining the Calls test command during rebase.

This PR supplies branch artifacts and CFG mapping for the documented TypeScript subset. It does not feed branch evidence into symbolic target selection; that belongs to #399/#355. The converter runs as a separate bounded process (10 seconds plus shutdown grace) after the concrete run; #354 must account for that cost in the total campaign deadline. Unsupported cases are not evidence of zero uncovered edges. #382 remains open pending review and integration evidence.

Refs #382, #345.

@CaelmBleidd
CaelmBleidd force-pushed the caelmbleidd/pbt-382-branch-feedback branch from f2ac7df to 5b55c65 Compare October 1, 2026 11:32
@CaelmBleidd
CaelmBleidd changed the base branch from main to caelmbleidd/iccq-runtime-limitations October 1, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant