Repository navigation
Core: harden codebase - #5
Merged
Merged
Conversation
Fellmonkey
added a commit
that referenced
this pull request
Nov 24, 2026
Fellmonkey
added a commit
that referenced
this pull request
Nov 24, 2026
Fellmonkey
added a commit
that referenced
this pull request
Nov 24, 2026
Fellmonkey
force-pushed
the
fix/codebase-hardening
branch
from
November 24, 2026 18:48
6f66474 to
5cd6954
Compare
- reject non-integral float seed values for integral fields - validate entity old_name as identifier and reject self-reference - fail on duplicate features instead of collapsing them silently - split validateField into focused rule helpers - register the new regression checks
…sions - reject unknown when conditions when loading a bridge manifest - alias the contract version to specmeta and drop bare literals - keep a resolved package version when the cache write fails - deduplicate the version cache pipeline - reject oversized NuGet responses instead of truncating them - report rollback failures instead of swallowing them
- keep existing permissions when AtomicWrite rewrites a file - export ir.TableNameFor and reuse it in the migration plan - unify casing variants for content and path rewrites - deduplicate the existing-file filter - assert byte-identical snapshot output
- make lint runs the pinned golangci-lint; vet stays separate - make build no longer rewrites go.mod/go.sum - CI cross-compiles the js/wasm validator and shuffles tests - bridges CI runs the hermetic TypeScript TCK halves - document consent flags, real bridge chains and C#-only rename artifacts
- alias CoreContractVersion to specmeta and dedupe embedded path helpers - reject unsafe branch names from cache metadata before git fetch - join fetch, reset, cleanup and re-clone errors - share the monorepo upward walk between resolvers
- --prune returns cleanup failures instead of advancing the snapshot - check chmod and report rename/restore errors during self-update - route progress and warnings through the logger - strip terminal controls from displayed bridge commands - bundle migration context and add prune orchestration tests
- record key presence for numeric config blocks instead of testing value == 0 - apply defaults only to omitted keys - accept explicit zeros in validator while still rejecting negatives - cover YAML merges and strict unknown-key behavior
JWT auth now needs a resolvable entity and at least one role. Range validators cover gte/lte, gt/lt and numeric min/max; invalid string bounds and defaults are errors. Unterminated modifier lists and keys smuggled through YAML merges no longer pass strict decoding.
Prune rewrites preserve invalid UTF-8 bytes in developer-owned files. Namespace detection no longer assumes C# syntax. Scaffold-once targets are staged once per render. Test seams and the app-dir override are protected against races.
Pinned refs with slashes resolve correctly. A cache checkout without proof of ownership is rejected; the contract gate checks the pinned ref. Git children get a deadline. Cache read errors and version parse errors are no longer masked. Cycle detection honours filesystem case rules.
Local builds stamp the version only from an exact tag. Invalid flag values exit 2; migration diagnostics go to stderr. Unknown addons warn. Tool versions live in the Makefile, and CI and release use the same gates as local runs.
Fellmonkey
force-pushed
the
fix/codebase-hardening
branch
from
November 25, 2026 23:01
e9aef15 to
4834795
Compare
Specmeta is the single source for field kinds, relation types and defaults. Parser, validator, IR and renderer share tables and predicates. Bundled bridges declare contract v2 and embed helper templates without explicit directives.
Fail closed on corrupt cache metadata and redirects. Share remote/path primitives, atomic writes and root lifetimes. Migration diffs share name resolution and carry canonical column names.
Fail-fast consent and argument checks, sanitized child output and WASM inputs, reports on stderr, shared toolchain and benchmark commands, and a regression table entry per bug fix.
Fellmonkey
force-pushed
the
fix/codebase-hardening
branch
from
November 26, 2026 19:06
4faf39e to
d9b0fc0
Compare
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 this changes and why
One change: harden the DomainCraft compiler and CLI contract. A full read-only review produced 234 findings; 175 are fixed here. The four left open are documented decisions (explicit permission-operation list, set type, two separate TTL policies, local untracked artifacts). The branch is three signed commits; the final tree is byte-identical to the reviewed state.
Core —
specmetaowns field kinds, relation types, index keys and defaults. Parser, validator, IR and renderer use one table per vocabulary instead of parallel switches. Every bugfix has a regression check named incompliance-suite/regressions.tsv. Contract version is v2: IR helpers areIsUuid/IsJson/IsJsonB; uppercase aliases are gone and all bundled bridges declarecontract_version: 2.Bridges and caches — corrupt metadata fails closed; unrelated local paths never become GitHub clones; release redirects reject credentials and internal targets; git environment is scrubbed. One redaction rule, one bounded HTTP client, one atomic-write helper, one path-normalization key.
Renderer and migrations —
when:conditions come from one table; staging steps are named without changing their order; helper templates arehelpers.*.tmpland embed with one directive. Migration plans use the canonical column names recorded insnapshot.json: a relation field's column iscategory_id, notcategory. Shadowed and chained renames no longer suppress or mis-targetRenameColumn. Cleanup opens roots through onewithRoothelper.CLI — flag syntax and
--adminarguments are validated before rendering; community-command consent is decided before files are written. Child-process output is sanitized; WASM arguments are type-checked; refactoring reports go to stderr so stdout stays usable.bridges --check-updatesis sequential and deterministic.CI — actions pinned to Node 24-based majors,
verifyjob gates tag pushes,tck.ymluses block-stylewith:mappings (flow mapping with${{ }}was invalid YAML),bench.ymlcopies the PR Makefile into the base worktree somake benchworks against older commits.CLAUDE.mdnow records the measured benchmark rule and these CI traps.Fixes # — none. The findings came from a review on this branch; no separate issue was opened.
How you tested it
Real CLI run on a fresh binary, not a unit test:
Tested on: local, Windows, Go 1.27.4.
Merge Danger
Door: mostly two-way; contract v2 and the helper-template rename are the one-way parts for external bridges.
Blast Radius: generated code and bridge templates. A community bridge using the removed uppercase IR helpers or a
_helpers.*.tmplfilename needs a template update. Rolling back means reverting three commits and rebuilding the binary; no generated project is changed by the merge itself.How you found it
AI tools used to write this change: yes — an OpenCode agent read the code, ran tests and benchmark comparisons, drafted the fixes, and drafted this PR text. The human author verified every change and owns the PR.
Checklist
make lintandmake testpass;make fmtwas skipped to preserve the CRLF working treecompliance-suite/regressions.tsv