Repository navigation
fix(dispatch): validate repository path components - #382
Merged
Merged
Conversation
what changed: Fix #379; dispatch.mjs, dispatch regression coverage, architecture map, changelog and test inventory. why: Restore the existing collection input and credential-handling contract. This is a bug fix with one remedy; no alternative design was set aside. what it touched: Shared remote collection seams; existing ADR-0033/0034 behavior. No new domain term or public interface. what you verified: verified - dispatch/MCP red-first reproduction and passing combined regression run (83 tests); CLI integration regressions pass in the broader command run. The commit gate runs the required complete offline suite before accepting this commit. what you got wrong and fixed: mistake - running six full suites concurrently exceeded the default 3900-second budget; where - local commit validation on this Windows host; impact - affected hooks refused commits before publication; cause - excess concurrent subprocess and filesystem work; fix - retry one commit at a time with the ADR-0142 timeout extension (RESEARCH_KIT_GATE_TIMEOUT=7920); verified - the required full-suite commit gate accepted the commit.
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.
Repository components containing
.., query/fragment delimiters or separators could alter token-bearing GitHub API request paths. Reject components outside[A-Za-z0-9._-]+, and reject.and.., in the shared repository splitter before any request.Fixes #379
what changed: Validated both repository components; expanded refusal coverage across dispatch, run lookup, artifact listing and download. Added a positive case for normal dots, underscores and hyphens.
why: Keep every request on its intended repository API route and report malformed repository input as
REPOSITORY. No alternative design was set aside.what it touched:
lib/dispatch.mjs, dispatch tests, architecture row, changelog and test inventory. Existing ADR-0033 behavior; no new domain term or public interface.what you verified: verified - isolated dispatch tests (33 passed), including zero requests for rejected names. The required full suite was accepted by the repository commit gate.
what you got wrong and fixed: mistake - the first validation expression used a
$anchor that can match before a final newline; where -splitRepositoryduring local implementation; impact - caught before commit or delivery, with no published result affected; cause - JavaScript regular-expression end-anchor semantics; fix - refuse any character outside the permitted alphabet and explicitly reject empty/dot components; verified - 33 passing dispatch tests, including trailing CR/LF cases across all four request helpers.Validation retry: mistake - running six full suites concurrently exceeded the default 3900-second budget; where - local commit validation on this Windows host; impact - affected hooks refused commits before publication; cause - excess concurrent subprocess and filesystem work; fix - retry one commit at a time with the ADR-0142 timeout extension (RESEARCH_KIT_GATE_TIMEOUT=7920); verified - the required full-suite commit gate accepted the commit.
Full-suite detail: verified - 1,778 passed, 0 failed, 12 unsupported capabilities on Windows/Node 24.20.0 in 1772.5 seconds. The gate's documented local unsupported-capability opt-in was used; CI exercises its supported platforms separately.