Repository navigation
harness.layout · core: sqlate takes the layout - #34
Merged
Merged
Conversation
mise run upgrade moved the two trailing pins currency reported: github:standards-lab/claude-plugins 0.24.0 -> 0.25.0 in mise.toml and jdx/mise-action v5.3.0 -> v5.4.0 in the CI workflow. Nothing needed adapting. go.work.sum gains the go.mod hashes of golang.org/x/mod v0.38.0 and golang.org/x/tools v0.48.0, which the check's sqlint step resolves under the committed go.work since x/text v0.41.0. Committing them leaves the tree clean after mise run check.
The check's Go gates, its sqlint step, and its two lints move to scripts/check/go.sh, scripts/check/sqlint.sh and scripts/check/lints.sh. The person's check is the file task mise-tasks/check, which runs the three steps directly. go.sh now vets, fixes and lints the integration-tagged suites with their tag. mise.agent.toml, loaded only under MISE_ENV=agent (set in .claude/settings.json), adds the agent tasks in .agent/mise-tasks/: check:go, check:sqlint and check:lints wrap each step, and test, vet and lint run the Go step with one gate. The multi-line tidy, integration and acceptance tasks become file tasks in mise-tasks/; the inline lint, vet and test go. build is one line again, go build -o ../bin/ ./... run in sqlint, so the sqlint command lands in the root's git-ignored bin/; its old GOWORK=off build of every module is the check's build gate. .gitignore lists .agent/state/ in place of .claude/briefs/. sqlint.sh unsets GOWORK, as the inline check's env -u GOWORK did, so it resolves through the committed go.work. lints.sh runs at the repository root only, as in go-core.
All 35 test files outside migrate/export_test.go move with git mv into <pkg>/test/ across the four modules (the root package's into test/), the ten integration-tagged live tests and postgres's TestMain included. go test -list reports the same 235 names, and 277 with -tags integration, before and after; mise run acceptance runs every live test from its new place. migrate's four TestLocked_* tests that use the SetAfter clock hook stay beside export_test.go, in migrate/locked_test.go, with tryLockAnswer, newTryMigrator and fired. The fixtures both migrate test packages use (ErrDriver, the Migrations set, the Locked/Created/Unlocked responses, History, AssertOps, NewMigrator and NewMigratorTable over LockingDialect) are hoisted into internal/migratetest. ErrDriver and NewMigratorTable join the hoisted list because the locked tests and newMigrator need them. sqlint's two tests that read ../../postgres skip, naming the missing tree, when it is absent, as in the sqlint module zip, and fail when the tree is present but a file is missing. pgvector's forms tests read ../sqlint.toml, inside their own module. The quick-start shows the sample's tests in teams/test/. Each module's CHANGELOG notes the layout under [Unreleased]; the root's also notes the step scripts, the agent profile and -tags integration on vet, fix and lint. testpackage was already narrowed to export_test\.go.
…package note Per release-and-ci.md, the [Unreleased] section records what changed: the person's build task now builds the sqlint command into bin/, and the testpackage skip regexp was already narrowed to export_test.go.
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.
harness.layout · task 8/17 · core
Summary
.agent/area, theagentprofile(
mise.agent.toml,MISE_ENV=agentin the Claude settings),.agent/state/ignored in placeof
.claude/briefs/, and a STANDARDS.md pointer toagent-separation.md.mise taskslists only their tasks:check,currency,upgrade,fmt,tidy.build,integration,acceptance,db:up,db:downanddb:reset.scripts/check/, and an agent runs one step at a time(
check:go,check:lints, and sqlate'scheck:sqlint).<pkg>/test/: go-core's 39 files and 294 tests, and sqlate's 35files and 277 tests. The test names are the same before and after.
shared
currency.sh.go.work.sum, and it now vets, fixes and lints theintegration suites with their tag.
Core changes
scripts/check/go.sh) runs the gates in each module, stops at the firstfailure, and runs only the gates you name. Why: the agent tasks
test,vetandlintare this step with a single gate.
gates=${*:-build vet gofmt fix tidy test lint}internal/migratetestholds the helpers both of migrate's test packages share. migrate'sfour lock-wait tests stay beside
export_test.goinmigrate/locked_test.go, because only atest file in the package's directory can use the
SetAfterhook.../../postgresskip, naming the missing tree, whenpostgresis absent, as it is in the module zip. They still fail when the tree is present but a file is
missing.
currencyandupgraderun thescripts/currency.shthat sqlate andgo-database share. Why: the old
upgradecouldn't move action pins or honorHOLDS.go.work.sumgains two lines: the go.mod hashes of x/mod v0.38.0 and x/toolsv0.48.0. Why: since x/text v0.41.0 arrived, every check run wrote them.
Verify
mise run check: ✓ exit 0 in go-core and in sqlate, with the tree clean afterwards.scripts/check.shin claude-plugins: ✓ All checks passed.env -u MISE_ENV mise tasks→ check, currency, fmt, tidy, upgrade.env -u MISE_ENV mise tasks→ those five, plus acceptance, build, db:down,db:reset, db:up and integration.
MISE_ENV=agent mise tasks→ the same list, pluscheck:go,check:lints(sqlate also hascheck:sqlint),lint,testandvet.mise run check, thengit status --short→ the check exits 0 andgit statusprints nothing.mise run acceptance→okforpostgres/test,postgres/pgtest/testandpostgres/pgvector/test, and no sqlate container or volume is left behind.mise run currency→ exit 0, nothing trailing.jdx/mise-actionback to v5.3.0 inci.ymland runmise run upgrade→the pin moves to v5.4.0.
mise run build→bin/sqlintexists, andgit statusstays clean.Decided without you
lintruns golangci-lint only. sqlint is its own step, run bycheck:sqlint. capstone-mikoshi'slintruns both. The spec review found no gap.buildis a one-line inline task that buildssqlintintobin/. Building everymodule with
GOWORK=offis now the check's job.ErrDriverandNewMigratorTablealso went intomigratetest, becausethe lock-wait tests need them.
buildtask":release-and-ci.md's Tasks section definesbuildonly for modules withmainpackages.sqlate's
scripts/check/go.shand its changelogs state it.currency.shdecision to the binding part: go-cli-sdk and go-observabilitytake the script in
libraries.(
reactor/test/wake_test.go,lifecycle/test/monitored_test.go), against "a stall is afinding, never a sleep".
Redirects and escalations
none
Merge danger: two-way door · blast radius: go-core and sqlate's tooling and test placement,
with no API change and no tag; claude-plugins gets the goal record only · go-core and sqlate:
merge waits on CI (
gh pr checks --watch) · claude-plugins: merge waits on CINeeds you: none