Skip to content

Phase 1 / Etch / Graduate const, private, and test#36

Merged
guysenpai merged 12 commits into
mainfrom
phase-1/etch/const-private-test
Jun 29, 2026
Merged

Phase 1 / Etch / Graduate const, private, and test#36
guysenpai merged 12 commits into
mainfrom
phase-1/etch/const-private-test

Conversation

@guysenpai

Copy link
Copy Markdown
Contributor

M1.0.8 — Graduate const (top-level), private, and test

Brief: briefs/M1.0.8-const-private-test.md

Graduates the last three reserved non_s3_keywords parser-up (lexer → AST → parser → resolver), the same shape as import in M1.0.7. override stays reserved (waits for a Tier-1 overridable module). Also clears the two M1.0.7 deferred debts: cross-file const resolution and activation of the dormant E0107 ImportPrivateItem check.

Closing notes

  • What worked: The M1.0.7 import graduation was a faithful template — lexer table move + AST slab + parse-fn + lockstep set + pass-1 registration + buildExports row. The E0107 path was genuinely wired-and-dormant in M1.0.7, so activation was a single change (buildExports reading Item.visibility). checkConstValue reused the field-default const surface verbatim (isConstEvaluable + synthExpr + literalTypeFits).
  • What deviated from the original spec: Only the three recorded deviations (test placement / the one-vs-two enumeration / a stale comment). No scope or behavioural deviation. parseStmt was left untouched (block-level const is a parse error, per scope); override stays reserved.
  • What to flag explicitly in review:
    1. Cross-file tests placed in tests/etch/import_resolve_test.zig, not inline in types.zig — forced by the tier dependency (types.zig cannot reach root.validateProject). The single-file tests (E0200, E1101, registration) are inline in types.zig as specified.
    2. src/etch/diagnostics.zig touched (outside the brief's file list) for a one-line §3.6.1 orphan-reference patch — the E0107 comment said "wired but dormant until M1.0.8", now stale post-activation.
    3. The lockstep had exactly ONE top-level error-message enumeration on the surface (parser.zig:690), not the two the brief states.
  • Final measurements: N/A (parser/resolver graduation, no perf gate). Suite: 872 tests pass debug + ReleaseSafe; +17 new tests (token 1, lexer 1, parser 6, types 4, import_resolve 5).
  • Residual risks / tech debt left intentionally: A string-named test "X" registers under the byte sequence X via registerSymbol, sharing the name namespace with identifier-named symbols (test "Foo" would collide with component FooE0101). Acceptable for M1.0.8 (the brief mandates registerSymbol); revisit when the M1.0.9 test-runner formalizes test identity. Out-of-scope-by-design: statement-level const (tri-doc drift, deferred to KB-audit), visibility inheritance + W0902, qualified m.Type, override.

Validation checklist

  • All Scope deliverables present (lexer graduation, AST nodes, parser, resolver symbols + const validation, exports + E0107 activation, cleared M1.0.7 debts)
  • No drift into Out-of-scope (parseStmt untouched, override reserved, no test execution, no m.Type, no W0902/visibility inheritance)
  • All acceptance Tests pass in debug and ReleaseSafe
  • Benchmarks: N/A
  • Observable behavior demonstrable (two-file fixture: ROOM_CAP import resolves clean; Secret import → E0107)
  • zig build (exit 0, no warnings), zig build test (debug + ReleaseSafe), zig fmt --check, zig build lint all green
  • CLAUDE.md §3.4 updated and committed on the branch
  • Brief "Closing notes" filled (4 rubrics + measurements + residual debt)
  • Brief Status: → CLOSED, Closed: date set
  • commit-msg hook green on every commit; pre-push gate green (build + test + test-release)

Merge + tag (v0.10.8-const-private-test) are left to Guy after review.

🤖 Generated with Claude Code

@guysenpai guysenpai merged commit dd2f915 into main Jun 29, 2026
16 of 18 checks passed
@guysenpai guysenpai deleted the phase-1/etch/const-private-test branch June 29, 2026 20:17
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