fix: bound TypeScript runner discovery (clean replacement for #2003)#2017
fix: bound TypeScript runner discovery (clean replacement for #2003)#2017Serhan-Asad wants to merge 20 commits into
Conversation
PDD-Auto-Heal-Checkpoint: success
Exact-head end-to-end evidence — real downstream runner boundaryValidated PR head Workflow exercisedFor each real Representative exact dynamic-route command returned by #2017: Result
This directly proves the original production failure is closed: deeply nested suites reach the correct runner/cwd, bracketed route segments remain literal through Greg's prior review surface / negative moldThe exact current head also passes:
The 90-test module includes public-boundary regressions for the previously requested pnpm exclusion and brace semantics, ordered re-inclusion, independent-package/repository/worktree containment, malformed/oversized declaration fail-closed behavior, in/out-of-root config symlinks, Jest/Vitest/Playwright path semantics, hostile shell paths, and bounded matcher work. Prompt / fingerprint / architecture / governance integrity
The rotation is now one direct current-main transition from requirement No merge or auto-merge was initiated. |
gltanaka
left a comment
There was a problem hiding this comment.
Review verdict: changes requested
This fix is needed. Current main still stops TypeScript runner discovery after five parents and invokes Jest without literal-path mode, so deeply nested Next.js suites can fall back to npx tsx, use the wrong cwd, or fail to match bracketed dynamic-route paths. The deep walk, returned runner cwd, --runTestsByPath, and path quoting in this PR solve that real pdd_cloud failure.
I cannot approve head c4c23d47b because two correctness/governance issues remain:
-
npm workspace exclusions can cross an independent-package boundary —
pdd/get_test_command.py:180-214. The implementation applies every provider declaration as one universal last-concrete-match rule. That is not npm workspace behavior. Withworkspaces: ["packages/**", "!packages/*"]and a leaf package atpackages/deep/app, npm 11.9@npmcli/map-workspacesreturns no workspace, while_declared_workspace_membership(("packages", "deep", "app"), ...)returnsTrue. Detection can therefore cross that leaf package's ownpackage.jsonand select the repository-root Jest config, violating the independent-package boundary. Please add an npm-parity regression and either implement the provider semantics faithfully or fail closed where parity is not supported; do not apply pnpm semantics as a universal npm/Yarn/pnpm rule. -
The protected verification-profile transition is invalid —
.pdd/verification-profile-rotations.json. Auto-heal correctly collapsed the metadata to a direct base-to-head row and refreshed its hashes, but current enforcement never readsrequirement_rotations. Running the repository's realbuild_unit_manifest(base=501de70a3, head=c4c23d47b)plusload_verification_profilesstill yields coverage0.997854and these failures: candidate rotation policy absent; protectedthreshold-human-attestationobligation changed; protected requirement removed; profile incomplete. Please make the actual base-to-head validation reach coverage 1.0 with zero invalid reasons using an enforced transition mechanism, and add a regression that exercises this real transition rather than only writing metadata that no validator consumes.
The prompt exists and reflects the new behavior. The existing architecture.json entry remains accurate because the public interface and architectural dependencies did not change. Fingerprint, code, example, test, and include hashes are current. As a follow-up quality improvement, the prompt should move the security/boundary behavior toward stable R<n> contracts and reduce private-helper/implementation prescriptions, consistent with the prompting guide.
Finally, this rewritten head has no posted exact-head downstream E2E transcript. The 339/339 evidence belongs to superseded #2003 implementations. After the boundary/profile fixes, please run the representative deeply nested bracketed suite through the real PDD execution boundary using the returned command and cwd (preferably all six cited pdd_cloud suites), and post the exact head, command/workflow, cwd, exit status, and test counts. This is reasonable and feasible because the same harness was already exercised for #2003.
Independent validation:
- focused runner suite: 90 passed
- verification-profile and rollout-policy suites: 19 passed
- production pylint: 10.00/10
- compile, JSON parse, and
git diff --check: passed - npm parity probe: failed as described above
- protected base-to-head profile validation: failed as described above
PDD-Auto-Heal-Checkpoint: success
Exact-head protected-transition and downstream-boundary evidenceValidated PR head Protected transitionThe real immutable
The seven metadata files that lacked ownership preauthorization in the protected base are no longer tracked. Real downstream execution boundaryFor every suite below, current-head
Total: 6/6 suites, 339/339 tests, every command exit 0. The fixture was an isolated detached checkout at the exact fixture SHA and remained Git-clean. Its only dependency shim was ignored Current-head validation and PDD integrity
No merge or auto-merge was initiated. |
Summary
Clean, narrow replacement for #2003. This preserves the runner-discovery behavior needed downstream while removing the accumulated review-loop history.
package.json; dangling, looping, escaping, unreadable, malformed, scalar, and array leaves fail closed.node_modulesworkspace exclusions while preserving explicit-dot declarations.--runTestsByPathand returns the required runner cwd.Exact-head verification
Candidate:
da1d9d9ed2d463f7d9111fb9d356c0ac0092e278tests/test_get_test_command.py+tests/test_agentic_langtest.py: 174 passed.git diff --checkpassed.501de70a...→da1d9d9ed...): 466/466, coverage 1.0, zero manifest-invalid, zero unaccounted, and zero profile-invalid reasons.architecture.jsonand.pddrcremain byte-unchanged because no module boundary, filepath, public interface, generation path, or context routing changed.get_test_commandfingerprints have zero mismatches. Composite prompt hash:bcae32a7...; code hash:cb7cc0b6...; test/test-files hash:5f0755e1.... Raw prompt requirement:CONTRACT-SHA256:25b37c67...; whole verification-policy hash:eaa6cba1....project_dependencies.csvnow matches the exactcontext/agentic_langtest_example.pybytes (cc55d0a5...), exports, imports, and current behavior.a2d69793...: 339/339 passed across six suites (39 + 21 + 239 + 5 + 18 + 17). Every lookup usedcwd=frontendand Jest--runTestsByPath; all six workaround shims were restored, zero disabled shims remained, and the fixture stayed clean.A fresh independent GPT-5.6-sol HIGH review is being run against this exact immutable candidate. No merge or auto-merge has been initiated by the author.
Merge guidance
Please merge this replacement instead of #2003 only after the exact-head independent review is clean. Manager approval and merge remain required.