feat: configurable per-tool build/test commands + opt-in go-test runner - #8
Open
DatScreamer wants to merge 3 commits into
Open
feat: configurable per-tool build/test commands + opt-in go-test runner#8DatScreamer wants to merge 3 commits into
DatScreamer wants to merge 3 commits into
Conversation
Add a dedicated two-tier config (.interlinked/tool-commands.json + tool-commands.local.json, keyed by check/config names) so a project can pin the exact argv Interlinked spawns for its build/lint/test tools. - Trust split mirrors guard-rules merge.ts: committed TEAM tier may set base_args (flags for a fixed binary) and timeout_ms; command/env stay personal-tier (arbitrary executable / runtime rewiring). - Check-engine catalog runners (go-build, golangci-lint, new go-test) honor the override; a full command argv wins, otherwise base_args replace the default scope so Go flag ordering stays correct. - affected_tests go dispatcher carries the go_test tags, replacing the full-suite ./... scope token with the touched package. - New 'go-test' catalog tool: project-wide, opt-in (auto-runs only when the project configures go_test or is explicitly requested), sync + async runners, generic fallback + Go test parsers producing [proven] findings. - verify streaming gains --only go-test (requestedOnly) with the resolved command; check --only/--tools and check --report list go-test. - Regression tests: config resolver (trust/precedence/validation), go-test runner argv+parser, engine mocks, verify-tools resolution pin.
…up/router Skill-impact review for the custom build/test command feature: the verify skill gains a 'Custom build/test command overrides' section (config shape, trust split, no-shell argv, opt-in go-test), setup documents the two new config files, and the router routes 'tool_commands' to interlinked-verify.
The __tests__/check.test.ts pin (sibling of commands/check.test.ts) was missed by the go-test tool-id wiring; update its exact unknown-check message so the drift guard covers both check test files.
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.
What & why
Every tool runner hard-codes its argv (
go build ./...,golangci-lint run ...), there is noconfig override, and there is no full-suite test tool. A Go project whose dev server
rebuilds with build tags (e.g.
-tags 'dev devaccounts') cannot have Interlinked run thatexact command — so Interlinked's checks compile into a separate Go build cache, recompiling
per surface (measured ~30–84 s cold vs ~6–21 s warm on the motivating Go workspace). This
branch lets a project declare its build/lint/test commands once and have every Interlinked
surface honor them.
Changes
.interlinked/tool-commands.json(committed) +.interlinked/tool-commands.local.json(gitignored), keyed by check/config names(
go_build,go_test,golangci_lint, …). A fullcommandarray wins; otherwisebase_argsreplace the runner's default scope (./...) so Go flag ordering stays correct.Trust split mirrors
merge.ts: the committed team tier may setbase_args+timeout_ms(flags for a fixed binary / a bounded cap);command/envstay personal-tier(
interlinked doctorreports violations). No shell interpolation — argv is written asexecuted (
-tags 'dev devaccounts'is ONE token["-tags","dev devaccounts"]).go-build,golangci-lint, and the newgo-testtoolspawn the configured argv, sync + async variants (
src/harness/check-engine/).go-testcatalog tool — project-wide, opt-in (auto-runs only when the projectconfigures
go_test, or on explicit--only go-test/--tools go-test/verify --only go-test), generic + Go test parsers producing[proven]per-test findings.Wired into
check --only/--tools/--report,TOOL_IDS, and theALL_TOOL_IDSdrift guard.affected_testscarries the tags — PostToolUse on a.goedit runsgo test <tags> -count=1 ./<pkg>, replacing the full-suite./...scope with the touchedpackage (
src/harness/quality-checks/).docs/interlinked-test-runners-plan.md).Verification
npm run typecheck— all feature files clean; only the pre-existing WIP error(
go-halstead-walk.ts, untracked) remains on this checkout.2796 tests pass; two mutation-kill suites pass; new unit/integration tests for the
resolver, runner argv+parser, and verify-tools resolution.
npm test: one regression this change introduced (a check-command available-checkslist pin) was fixed before opening the PR; the failing files on a full run fail identically
on pristine
origin/main(Node 20.19.2 lacksnode:sqlitefor the mutation-journalsuites, plus known metrics/compiler-gate env-timing flakes).
Acceptance (isolated
GOCACHE, re-confirmed after rebase)check --only go-buildcheck --only go-buildcheck --only go-testgo build -tags 'dev devaccounts' ./...go test -tags 'dev devaccounts' ./...After-runs hug the warmed-tagged-cache baseline (direct warm repeats 5.5 s build / 23 s
suite), proving the tagged command reuses the dev cache instead of recompiling.
Known v1 gaps (deferred, documented in the plan)
verify --jsonhas no per-runnergo-testsection yet (fixed-shape schema).interlinked harness restartin existing repos.Closes #7