Repository navigation
build: pin Go toolchain go1.25.12 + add windows/arm64 release target - #150
Merged
Merged
Conversation
Add a `toolchain go1.25.12` directive to go.mod for reproducible builds, pinning the build toolchain to the current 1.25 patch. The language version stays at `go 1.25.0` (support policy = last 2 minors, 1.25 is still supported; a 1.26 bump is a separate call). The toolchain line is >= the go line as required. Widen the goreleaser release matrix to include windows/arm64 by dropping the `ignore` block that excluded it. This is a pure cross-compile addition; the existing windows->zip format override already covers it. darwin/linux entries are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…elease matrix) The npm wrapper's UNSUPPORTED set still listed windows/arm64, so after enabling it in the GoReleaser matrix the binary WOULD build but `npm i -g @civitai/cli` on windows/arm64 would still throw "no prebuilt binary … (not built by GoReleaser)" — a now-false error. Emptied the set (all OS_MAP×ARCH_MAP combos are built) so the wrapper resolves civitai_<v>_windows_arm64.exe from the civitai-raw archive. Kept the mechanism + comment for future matrix drops. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ZacxDev
added a commit
that referenced
this pull request
Oct 4, 2026
… express (#782) `civitai app validate` ACCEPTED every manifest the paid-app path can get wrong, and the server rejected all three at submit. Measured end-to-end, binary built from `origin/main` against one built from this branch, on manifests derived from `civitai-block-starter`: fixture origin/main this branch app_unlock, no justification ACCEPTED rc=0 REJECTED rc=1 app_unlock priced 7777 ACCEPTED rc=0 REJECTED rc=1 two app_unlock goods ACCEPTED rc=0 REJECTED rc=1 a CORRECT app_unlock (control) ACCEPTED rc=0 ACCEPTED rc=0 The control is the point: the probe discriminates rather than rejecting anything mentioning `app_unlock`. WHY THESE BELONG HERE. `goodsChecks` already ports the goods rules JSON Schema cannot express, and these pass the same test — the vendored schema does not reject any of them. ⚠ But NOT because the dialect cannot express them: draft 2020-12 has `if`/`then` + `required`, `contains` + `maxContains` and a conditional `maximum`, and the upstream constants file records the decision as DECLINED ("more surface than this one property is worth"), not impossible. The real reason is ownership — the vendored schema is an auto-revendored byte-mirror this repo may not unilaterally edit. Declaring the rules upstream would cover the SDK, developer.civitai.com and every third-party validator, and would make most of this redundant; that is the better fix and is recorded as such in the code. Values mirrored from `block-goods.constants.ts` (:117, :183, :459) with the server's message text verbatim, including the ` for an app_unlock good` suffix — for an `app_unlock` that string is the only machine-delivered statement of the real limit. ORDER AND ARITY. Checks sit at the server's own positions and each ends the entry, because the server is a `forEach` whose every rejection returns; two findings for one entry would make the local output a different SET from the 400 it predicts. Arity is the exception — additive, at path `goods` — and counts only goods that SURVIVED, mirroring the server's parsed array. Both of the server's stated arity consequences are pinned, including two unlocks sharing an id reporting only the duplicate error, which was previously untested either way. 🔴 The price check is deliberately NOT clamped to the window where the schema passes. An earlier draft was, "so as not to report twice", and an `app_unlock` at 60000 then received ONLY the schema's `maximum: got 60,000, want 50,000` — ten times the real ceiling, telling a developer to come down to a bound they were still 55000 over. "Never report twice" was never an invariant of this file: a goods entry with no `title` already emits both a semantic and a schema finding. Naming the wrong bound is worse than naming it twice. Also: the `### Docs` section of the AGENTS.md this CLI writes had ZERO references to goods, earning, unlock or justification, so an agent following the file had no route to these rules. It now points at apps/guide/earning.md and states the three inline. Golden updated in the same commit. VERIFIED: 29 PASS / 0 FAIL on the app_unlock tests (25 rows + 2 funcs, counted rather than estimated); the three price rows RED at the merge-base and green at head; 16 mutants killed across two sweeps, each verified to have applied AND compiled before its result was read, under -count=1 so Go's cache cannot serve a stale pass — including a mutant that re-adds the clamp, so a reintroduction is caught. Full suite: failing-test name set byte-identical to origin/main. Three adversarial audit rounds. One finding was REJECTED with evidence and pinned: the invalid-`kind` skip suppresses the payload byte-size finding, and so does the server (kind check returns at :385-387, payload check at :464), so "fixing" it would be the divergence. Every other finding was prose, several written by the previous round's own fix. Sibling docs change: civitai/civitai-developer-docs#150, merged and deployed first on purpose — this PR's AGENTS.md block points readers at earning.md, and that page carried none of these rules until #150 shipped.
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.
Summary
Two low-risk build/release hardening changes:
toolchaindirective — addtoolchain go1.25.12togo.modfor reproducible builds, pinning the build toolchain to the current 1.25 patch. The language version stays atgo 1.25.0(support policy = last 2 minors → 1.25 is still supported; a 1.26 bump is a separate, larger call). Thetoolchainline is>=thegoline as required.windows/arm64to the goreleaser build matrix by dropping theignoreblock that excluded it. Pure cross-compile addition; the existingwindows → zipformat override already covers it. darwin/linux entries unchanged.Verification
go build ./...,go test ./...,go vet ./...,gofmt -l .— all cleango mod verify→ all modules verified;go.sumunchanged (toolchain directive alone doesn't touch it)goreleaser check→1 configuration file(s) validated🤖 Generated with Claude Code