Skip to content

harness.layout · core: sqlate takes the layout - #34

Merged
JaimeStill merged 5 commits into
mainfrom
core
Nov 29, 2026
Merged

JaimeStill merged 5 commits into
mainfrom
core

Conversation

@JaimeStill

Copy link
Copy Markdown
Contributor

harness.layout · task 8/17 · core

Summary

  • go-core and sqlate take the layout: an .agent/ area, the agent profile
    (mise.agent.toml, MISE_ENV=agent in the Claude settings), .agent/state/ ignored in place
    of .claude/briefs/, and a STANDARDS.md pointer to agent-separation.md.
  • A person's mise tasks lists only their tasks:
    • go-core: check, currency, upgrade, fmt, tidy.
    • sqlate: the same five, plus build, integration, acceptance, db:up, db:down and
      db:reset.
  • The check runs as step scripts under scripts/check/, and an agent runs one step at a time
    (check:go, check:lints, and sqlate's check:sqlint).
  • Every unit test now sits in <pkg>/test/: go-core's 39 files and 294 tests, and sqlate's 35
    files and 277 tests. The test names are the same before and after.
  • Both repositories are current: marathon 0.25.0 and mise-action v5.4.0. go-core now runs the
    shared currency.sh.
  • sqlate's check no longer dirties go.work.sum, and it now vets, fixes and lints the
    integration suites with their tag.

Core changes

  1. The Go step (scripts/check/go.sh) runs the gates in each module, stops at the first
    failure, and runs only the gates you name. Why: the agent tasks test, vet and lint
    are this step with a single gate.
    gates=${*:-build vet gofmt fix tidy test lint}
  2. internal/migratetest holds the helpers both of migrate's test packages share. migrate's
    four lock-wait tests stay beside export_test.go in migrate/locked_test.go, because only a
    test file in the package's directory can use the SetAfter hook.
  3. sqlint's tests that read ../../postgres skip, naming the missing tree, when postgres
    is absent, as it is in the module zip. They still fail when the tree is present but a file is
    missing.
  4. go-core's currency and upgrade run the scripts/currency.sh that sqlate and
    go-database share. Why: the old upgrade couldn't move action pins or honor HOLDS.
  5. sqlate's go.work.sum gains two lines: the go.mod hashes of x/mod v0.38.0 and x/tools
    v0.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.sh in claude-plugins: ✓ All checks passed.

  1. In go-core, env -u MISE_ENV mise tasks → check, currency, fmt, tidy, upgrade.
  2. In sqlate, env -u MISE_ENV mise tasks → those five, plus acceptance, build, db:down,
    db:reset, db:up and integration.
  3. In either repository, MISE_ENV=agent mise tasks → the same list, plus check:go,
    check:lints (sqlate also has check:sqlint), lint, test and vet.
  4. In each repository, run mise run check, then git status --short → the check exits 0 and
    git status prints nothing.
  5. In sqlate, mise run acceptance → ok for postgres/test, postgres/pgtest/test and
    postgres/pgvector/test, and no sqlate container or volume is left behind.
  6. In each repository, mise run currency → exit 0, nothing trailing.
  7. In go-core, set jdx/mise-action back to v5.3.0 in ci.yml and run mise run upgrade →
    the pin moves to v5.4.0.
  8. In sqlate, mise run build → bin/sqlint exists, and git status stays clean.

Decided without you

  1. sqlate's agent lint runs golangci-lint only. sqlint is its own step, run by
    check:sqlint. capstone-mikoshi's lint runs both. The spec review found no gap.
  2. sqlate's build is a one-line inline task that builds sqlint into bin/. Building every
    module with GOWORK=off is now the check's job.
  3. The lints step runs at the repository root only, since neither repository is nested.
  4. The shared helpers ErrDriver and NewMigratorTable also went into migratetest, because
    the lock-wait tests need them.
  5. Dropped decision "core: a library with no command has no build task":
    release-and-ci.md's Tasks section defines build only for modules with main packages.
  6. Dropped decision "core: sqlate's check vets, fixes, and lints the tagged suites":
    sqlate's scripts/check/go.sh and its changelogs state it.
  7. Trimmed the currency.sh decision to the binding part: go-cli-sdk and go-observability
    take the script in libraries.
  8. Added a pending edit for a backlog goal: go-core's tests that wait with fixed sleeps
    (reactor/test/wake_test.go, lifecycle/test/monitored_test.go), against "a stall is a
    finding, 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 CI

Needs you: none

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.
@JaimeStill
JaimeStill merged commit 9b2b605 into main Nov 29, 2026
1 check passed
@JaimeStill
JaimeStill deleted the core branch November 29, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant