Context
This is the canonical tracker for the architecture / runtime-unification sequence.
Use this issue to track PR order and boundary intent; keep detailed design in
docs/design/architecture-execution-plan-2026-06-12.md and
docs/design/architecture-redesign-2026-06-12.md.
The current architecture pressure is boundary clarity, not a full rewrite:
- the tree-walker remains the correctness oracle;
- bytecode is the long-term optimization path, not an independent semantic owner;
- closure conversion is legacy experimental evidence, not the destination;
- runtime operations should own observable JavaScript semantics;
- stdlib/compiler representation access is classified debt to retire over time;
- mutable state should remain owned by explicit interpreter/realm/host records.
Current baseline — 2026-06-25
Local reconciliation status:
make architecture-audit exists and passes.
- Stage 0 guardrails are implemented: mutable-state audit, import-boundary audit,
representation-access audit, and surface-taxonomy audit.
- Current audit baseline:
- 73 local imports
- 2 allowlisted import debts
- 1294 classified representation-access sites
- 13 generated-interface packages
- 597 public symbols
- 12 package-defaulted symbols
scripts/architecture_representation_access.json is current as of the
reconciliation refresh.
- Bytecode has file-level IR/lowering/VM separation:
compiler/bytecode_ir.mbt
compiler/bytecode_lower.mbt
compiler/bytecode_vm.mbt
- The bytecode/tree-walker equivalence harness exists in
compiler/bytecode_test.mbt and unsupported labels are centralized as
UNSUPPORTED_* constants in compiler/bytecode_ir.mbt.
Interpretation: the 1294 representation-access sites are classified debt, not
a solved boundary. Future architecture PRs should either shrink that number or
explain why it stays stable.
Current architecture PR sequence
| Seq |
PR / Issue |
Goal |
Boundary strengthened |
Status |
Required validation |
Audit delta |
| PR0 |
#456 |
Reconcile architecture docs and representation inventory with current repo state |
Planning / guardrails |
merged |
moon check; moon test; make architecture-audit; moon info; moon fmt; git diff --check |
inventory current; audit passing |
| PR1 |
#245 |
Audit runtime state ownership and keep mutable state realm/host/interpreter-owned |
State ownership |
queued |
moon check; moon test; make architecture-audit |
state audit remains empty |
| PR2 |
#307 / PR #461 |
Migrate ToLength / ToIndex from Int to Int64 |
Spec-sized index semantics |
merged |
moon check; moon test; focused length/index tests; make architecture-audit; moon info; CI strict/non-strict Test262 shards |
no accidental boundary growth |
| PR3 |
#439 |
Type environment markers before marker set grows |
Environment marker ownership |
conditional |
moon check; moon test; make architecture-audit; delete-focused Test262 check if touched |
no new ad-hoc marker strings |
Status vocabulary
Use one of:
queued
active
blocked
review
merged
deferred
conditional
#439 is intentionally conditional: do it when environment marker call sites
or marker kinds grow enough that string keys become an actual pressure.
Completed / reconciled items from the older tracker
These are no longer next-step blockers:
PR contract
Every PR in this sequence should include:
Architecture sequence: PR N of #392
Boundary strengthened:
- ...
Behavior changes:
- None / intentional: ...
Audit effect:
- import boundary: unchanged / changed
- representation inventory: unchanged / shrank by N / refreshed
- surface taxonomy: unchanged / changed
Validation:
- [ ] moon check
- [ ] moon test
- [ ] make architecture-audit
- [ ] moon info
- [ ] moon fmt
- [ ] git diff --check
Rollback:
- ...
Rules:
- Prefer behavior-preserving, reversible PRs.
- Do not combine architecture cleanup with unrelated conformance feature work.
- Do not expand closure conversion feature coverage except for bug fixes,
benchmark maintenance, or retirement-support work.
- If a PR touches bytecode semantics, add or update tree-walker equivalence
coverage in compiler/bytecode_test.mbt.
- If a PR changes public/generated surfaces, run
moon info and explain the
.mbti diff.
- If representation-access debt grows, the PR must justify why and identify the
retirement stage.
Acceptance criteria for this tracker
This tracking issue can close when:
Notes
- This tracker is internal architecture work. Conformance numbers should only be
cited from CI artifacts / make test262-report, not copied from stale prose.
- The goal is reduced blast radius and clearer ownership, not aesthetic package
reshuffling.
Context
This is the canonical tracker for the architecture / runtime-unification sequence.
Use this issue to track PR order and boundary intent; keep detailed design in
docs/design/architecture-execution-plan-2026-06-12.mdanddocs/design/architecture-redesign-2026-06-12.md.The current architecture pressure is boundary clarity, not a full rewrite:
Current baseline — 2026-06-25
Local reconciliation status:
make architecture-auditexists and passes.representation-access audit, and surface-taxonomy audit.
scripts/architecture_representation_access.jsonis current as of thereconciliation refresh.
compiler/bytecode_ir.mbtcompiler/bytecode_lower.mbtcompiler/bytecode_vm.mbtcompiler/bytecode_test.mbtand unsupported labels are centralized asUNSUPPORTED_*constants incompiler/bytecode_ir.mbt.Interpretation: the 1294 representation-access sites are classified debt, not
a solved boundary. Future architecture PRs should either shrink that number or
explain why it stays stable.
Current architecture PR sequence
moon check;moon test;make architecture-audit;moon info;moon fmt;git diff --checkmoon check;moon test;make architecture-auditToLength/ToIndexfromInttoInt64moon check;moon test; focused length/index tests;make architecture-audit;moon info; CI strict/non-strict Test262 shardsmoon check;moon test;make architecture-audit; delete-focused Test262 check if touchedStatus vocabulary
Use one of:
queuedactiveblockedreviewmergeddeferredconditional#439is intentionallyconditional: do it when environment marker call sitesor marker kinds grow enough that string keys become an actual pressure.
Completed / reconciled items from the older tracker
These are no longer next-step blockers:
[[OwnPropertyKeys]]enumerators: closed.Reflect.setpre-flight unification: closed.PropertyBag.internal_slotskeys: closed by PR arch: type-safe InternalSlotKey enum for PropertyBag.internal_slots #455.make architecture-audit.audit / typed result cleanup, not first-harness creation.
PR contract
Every PR in this sequence should include:
Rules:
benchmark maintenance, or retirement-support work.
coverage in
compiler/bytecode_test.mbt.moon infoand explain the.mbtidiff.retirement stage.
Acceptance criteria for this tracker
This tracking issue can close when:
interpreter/realm/host records.
ToLength/ToIndexuse a spec-sized representation. ✅ PR runtime: migrate array-like lengths to Int64 #461 (9b89b6c)open as a conditional follow-up with no current marker-growth pressure.
make architecture-auditpasses.moon check && moon testpass.Notes
cited from CI artifacts /
make test262-report, not copied from stale prose.reshuffling.