Skip to content

Audit remediation (2026-05-29): functional CLI + framework + doc fidelity#82

Merged
jcsvwinston merged 11 commits into
mainfrom
fix/audit-2026-05-29-remediation
May 29, 2026
Merged

Audit remediation (2026-05-29): functional CLI + framework + doc fidelity#82
jcsvwinston merged 11 commits into
mainfrom
fix/audit-2026-05-29-remediation

Conversation

@jcsvwinston
Copy link
Copy Markdown
Owner

Summary

Remediates the 2026-05-29 exhaustive audit (docs/audits/2026-05-29-exhaustive-audit.md):
the CLI again scaffolds buildable projects, several framework anomalies are fixed,
and the website/guides are made faithful to the shipped API. 11 commits, grouped by block.

Changes

  • Runtime (P0): Router.Resource("") no longer panics at startup (pkg/nucleus/router.go joinPath floors empty to / and collapses //).
  • CLI (P0): generated go.mod declares go 1.26 + toolchain go1.26.3; framework dependency pinned to v0.8.0 (not the floating latest); nucleus generate resource now emits compiling code (writeError arity + router.FromHTTP adapter); generate honors flags placed before/after the positionals.
  • Security / robustness (P1): admin_auth_database is resolved only when defaults are enabled (WithoutDefaults no longer fails on a stray alias); SameSite=None requires Secure (warn + startup validation); app-level Lifecycle.OnShutdown is bounded by a deadline; CORS never emits Allow-Origin: * together with Allow-Credentials: true.
  • Contracts (P1): the freeze generator now captures type-associated consts (auth HS256/RS256/ES256, nucleus ResourceMethod, signals, circuit, db, plugins, storage); the CLI freeze baseline + matrix now cover config/doctor/openapi/wizard.
  • Docs (P0): website config rewritten to the real flat schema; homepage example uses .Start(); ~24 non-existent symbols across website + guides replaced with the shipped API; tasks/scheduler API corrected to the real pkg/tasks interfaces.

Verification (all green locally, 2026-05-29)

  • go vet ./...
  • go test ./...
  • go test ./internal/cli/...
  • go test ./contracts/... (freeze green with the regenerated baseline)
  • cd website && npm run build
  • CI Required Gate

Details under CHANGELOG.md [Unreleased]. Full findings and rationale in docs/audits/2026-05-29-exhaustive-audit.md.

…panics

Empty prefix+path produced the pattern "GET ", panicking http.ServeMux at
startup. joinPath never returns "" and collapses double slashes; Resource
guards base=="". Adds package-internal regression tests. (audit FW-1)
- app: resolve admin_auth_database only when !WithoutDefaults
- auth: SameSite=None forces/【requires Secure (warn + startup validation)
- nucleus: bound app-level Lifecycle.OnShutdown with a deadline
- router: never emit Allow-Origin:* with Allow-Credentials:true (reflect origin)
… (audit CLI-1/2/3/4, FW-5)

- scaffold: generated go.mod floor go 1.26 + toolchain go1.26.3 (interpolated)
- new: pin framework dep to v0.8.0 (not mutable latest); network build smoke
- generate: fix writeError arity + ResourceHandlers via router.FromHTTP
- contracts: freeze typed consts (typ.Consts); add config/doctor/openapi/wizard
…n FW-4 session test

runGenerate parsed args with fs.Parse(args), so Go's flag pkg stopped at the
first positional and silently dropped --out/--force/--migrations after the
<kind> <name> (writing into CWD). Now extracts leading positionals then parses,
accepting flags before and after. Also fixes a go vet %v-on-func-value in
pkg/app/session_fw4_test.go.
…ated consts (FW-5)

The freeze generator now iterates typ.Consts, surfacing previously-unguarded
exported constants: auth {HS256,RS256,ES256}, nucleus ResourceMethod
{Index,Show,Create,Update,Patch,Destroy}, signals {Pre,Post}{Create,Save,Update,Delete},
circuit State{Closed,Open,HalfOpen}, db EngineSQL, plugins Source*, storage
Provider*/Public/Private. Additions only; no removals.
…ck 2)

TestRun_NewProjectScaffold asserted the old `go 1.25` floor; update it to the
corrected `go 1.26` + `toolchain go1.26.3` that the scaffolder now emits.
@jcsvwinston jcsvwinston merged commit 64897f4 into main May 29, 2026
12 checks passed
@jcsvwinston jcsvwinston deleted the fix/audit-2026-05-29-remediation branch May 29, 2026 17:53
jcsvwinston added a commit that referenced this pull request May 29, 2026
…83)

PR #82 (audit remediation) merged to main as 64897f4. Archive the completed
iteration to docs/iterations/2026-05-29-audit-remediation.md, reset
CURRENT_ITERATION.md to an awaiting-owner-direction stub (backlog carried
forward), and refresh HANDOFF.md.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jcsvwinston added a commit that referenced this pull request May 31, 2026
Block 8 / Go-version doc fix (audit OTH README go-version cross-check)
merged to main as 6ce4831 (PR #88), which closes the entire 2026-05-29
exhaustive audit (Blocks 1-8 all shipped via PRs #82, #86, #88). Archive
the iteration directly to docs/iterations/2026-05-29-block8-go-version-docs.md
(CURRENT_ITERATION.md was never scoped mid-flight for this small doc fix).
Record the completion and the audit-closed milestone in the decisions log,
remove the now-done Block 8 item from the maintainer backlog, and refresh
HANDOFF.md with the remaining candidate (modules.* env-layer override).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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