Repository navigation
fix: explainer FormRequest semantics, NestJS ir:wraps, silent Laravel pass errors, flaky test workers - #13
Merged
Merged
Conversation
…pass catches - package.json: `npm run trace` pointed at apps/cli/dist/index.js; the CLI builds to index.cjs. - retrieval, nestjs-parser, mcp-server: maxWorkers 50 so each test file gets its own process. Their tests load the tree-sitter parsers (Laravel, Spring Boot, Go), whose module-level Parser fails intermittently when Jest reuses a worker across files — retrieval's cross-framework test failed 15 cases once and passed on rerun. Same fix laravel-parser already has. - laravel-parser graph-augmenter: the transaction, isolation, audit-log and nested service-call passes, and a queued job's handle(), no longer swallow errors silently. The parsers already turn unreadable files into empty results, so what reaches these catches is a bug; it is now reported on stderr with the pass and file, and the pass is skipped as before.
…ported and skipped The isolation parser is made to throw for the service file only; the test checks the stderr warning names the pass, the file and the error, that the rest of the graph (the service's calls, the transaction) is still built, and that later passes of the same service (its guard clause) still run.
…n_transaction" "within_transaction" is neither an IR relation nor a tracked legacy one, so validateGraph reported it as unknown. None of the conformance fixtures opened a transaction, which is how it went unnoticed. Writes now hang off the transaction by ir:wraps, as in Laravel and Express graphs (nothing reads the old relation). New conformance suite on the auth-transaction fixture; it fails on the old emitter.
… layer
over_authorized_route counted every ir:validation_gate as a third
authorization layer ("FormRequest::authorize"), and delegated_validation
reported validators as delegating authorization. Both are about Laravel's
FormRequest::authorize(); a NestJS ValidationPipe, Spring @Valid, Gin binding
or Express celebrate / express-validator only checks the input. They fired on
ordinary authenticated, role-checked, validated routes outside Laravel (on one
Express project: 5 over_authorized_route, 12 delegated_validation).
The FormRequest meaning now applies when graph.framework is "laravel" or unset
(legacy and hand-built graphs keep their behaviour). Outside Laravel a route has
at most two authorization layers, so over_authorized_route does not fire there.
The NestJS detector test that asserted the old behaviour is updated.
This was referenced Nov 12, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small fixes found while working on the other open PRs. Merge after #12 —
maindoes not build on a clean checkout until then.Changes
over_authorized_routecounted everyir:validation_gateas a third authorization layer ("FormRequest::authorize") anddelegated_validationreported validators as delegating authorization. Both describe Laravel'sFormRequest::authorize(); a NestJSValidationPipe, Spring@Valid, Gin binding or Express celebrate / express-validator only checks the input. The FormRequest meaning now applies when the graph's framework islaravelor unset. Behaviour change: outside Laravel a route has at most two authorization layers, soover_authorized_routeno longer fires on NestJS / Spring Boot / Go. One NestJS detector test asserted the old behaviour and is updated.ir:wrapsinstead ofwithin_transaction. Writes inside a transaction were linked by a relation that is not in the IR, sovalidateGraphreported it as unknown; no conformance fixture opened a transaction, which is how it went unnoticed. New conformance suite on a transaction fixture (fails on the old emitter). Nothing reads the old relation.handle(), swallowed every error. The parsers already turn unreadable files into empty results, so what reached these catches was a bug that read as "nothing found". Now reported on stderr with the pass and file; the pass is still skipped. New test makes one pass throw and checks the warning, that the rest of the graph is built, and that later passes still run.retrieval,nestjs-parserandmcp-serverload the tree-sitter parsers, whose module-level parser fails intermittently when Jest reuses a worker across files.maxWorkers: 50(one process per test file), aslaravel-parseralready has.npm run tracepointed atapps/cli/dist/index.js; the CLI builds toindex.cjs.[Unreleased]entry for the above.Verified
fix/buildmerged in:npm ci, build (22 workspaces),npm test— all pass.retrievalwith every test file in one process (--runInBand) failed 5 of 5 runs (29–44 tests each); with the fix 0 of 10, andnestjs-parser0 of 10.npm run trace -- --project research/cross-framework/auth-only/laravelruns.Merge note
feat/express-parseralso adds a CHANGELOG[Unreleased]section at the same spot; whichever merges second needs the two sections combined.On real projects
Before/after on shallow clones (graphs unchanged in every case):
delegated_validation+ 2over_authorized_routeremoved (20 → 5 findings).missing_authorizationleft).over_authorized_route+ 21delegated_validationfrom@Validatedappear without this PR.