fix: bound TypeScript runner discovery (clean replacement for #2003)#2017
fix: bound TypeScript runner discovery (clean replacement for #2003)#2017Serhan-Asad wants to merge 42 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. |
…_checkup_orchestrator, code_generator_main, fix_code_loop, fix_error_loop, get_test_command PDD-Auto-Heal-Checkpoint: success
# Conflicts: # .pdd/verification-profile-rotations.json # pdd/sync_core/verification.py # tests/test_sync_core_pdd_rollout_policy.py # tests/test_sync_core_verification_profiles.py
…_checkup_orchestrator, code_generator_main, fix_code_loop, fix_error_loop, get_test_command PDD-Auto-Heal-Checkpoint: success
# Conflicts: # .pdd/meta/ci_drift_heal_python.json
gltanaka
left a comment
There was a problem hiding this comment.
Current-head review — changes requested
Reviewed exact head 53c70a86d9dfa6c84174925c4bc43558d6d85460 against live protected main e50f0213b10362c528b96276961870e89e488452.
The historical npm parent-exclusion blocker is fixed, and the requirement-rotation mechanism works against the PR’s pinned base 23ff5836. The current head is still not merge-ready:
-
[P1] The protected base-to-head transition fails against current main. Production
build_unit_manifest(origin/main, HEAD)/load_verification_profiles(...)returns 466 managed units but 2 manifest-invalid/unaccounted paths (.pdd/meta/agentic_langtest_python.jsonand_run.json), profile coverage0.9914163090128756, and 16 invalid reasons acrossagentic_langtest,ci_detect_changed_modules,fix_error_loop, andget_test_command(protected obligation changed, protected requirement removed, transition bindings mismatch, profile incomplete). The bootstrap and regression remain pinned to stale base23ff5836inpdd/sync_core/manifest.py:103,pdd/sync_core/verification.py:128, andtests/test_sync_core_pdd_rollout_policy.py:25,222-241. Integrate current main, obtain protected-base ownership/rotation authorization through the enforced mechanism (not candidate self-authorization), and require coverage 1.0 with zero manifest/profile invalid reasons for the actual protected-base transition. -
[P1] npm glob comments can prove false workspace membership.
pdd/get_test_command.py:135-162treats a positive pattern beginning#as a literal. npm 10.9.3 /@npmcli/map-workspaces4.0.2 returns no workspaces forworkspaces: ["#pkg"], but this head returnsTrueand public resolution for an independentrepo/#pkg/package.jsontest selects the repository-root Jest config/cwd. That crosses the package boundary and can execute the wrong ancestor runner config. Add npm-parity public regressions for#pkgand./#pkg, and ignore/comment-handle them faithfully or fail closed. -
[P2] Published sync architecture does not match runtime.
architecture.json:3135andpdd/prompts/sync_orchestration_python.prompt:8advertiseone_session: bool = False, butpdd/sync_orchestration.py:2025-2057has no such parameter. A consumer following the declared interface getsTypeError. Align prompt, architecture, and runtime, with signature-conformance coverage. -
The head conflicts with current main and its green evidence is not post-integration evidence. Git reports content conflicts in
.pdd/meta/ci_drift_heal_python.jsonandtests/test_sync_core_pdd_rollout_policy.py(with overlapping main changes also in.pdd/verification-profiles.jsonandtests/test_ci_drift_heal.py). Current CI is green, but it predatese50f0213and cannot validate the required conflict resolution. The posted real-boundary 339/339 runs are at older PDD heads (c4c23d47/c2dba25d), not this head; the PR body still namesda1d9d9as candidate.
After fixing the above, please rerun the real protected-base validator, all exact-head CI, focused runner/governance suites, and the runbook-required real get_test_command_for_file(...) command/cwd execution on the immutable downstream fixture (or a newer equivalent), posting exact head, cwd/command, exit status, and counts.
Independent current-head evidence: runner + langtest 180 passed; TestCommand consumer integration 7 passed; PR-added integration-focused tests 5 passed; all 11 changed fingerprint records matched current artifacts; architecture/include validation and dependency hash checks were clean; JSON, git diff --check, and current-head GitHub checks were green. Those positives do not override the reproduced boundary, protected-transition, interface, and integration blockers above.
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.