Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
ae48763
phase2 r0: numbers design, site inventory and test map (#1758)
InauguralPhysicist Oct 14, 2026
102e663
phase2 design r2: leaf evaluator, token-forced meaning changes, measu…
InauguralPhysicist Oct 14, 2026
e3c9b23
phase2 design r3: osr witness reaches the return sentinel, the bridge…
InauguralPhysicist Oct 14, 2026
ea83de5
phase2 R1.1: the slot layer -- the SMI tag, its readers, every slot c…
InauguralPhysicist Oct 14, 2026
19be0b5
phase2 R1.1: the C slot test, its suite section and plant 1 (#1758)
InauguralPhysicist Oct 14, 2026
9ce8e0b
phase2 R1.1: tools/phase2_check.sh with --through, the int-source che…
InauguralPhysicist Oct 14, 2026
e84bb2f
phase2 R1.1 fix: the four type-error arms refuse an int; the smi-trap…
InauguralPhysicist Oct 15, 2026
d807683
phase2 R1.1 fix: the slot test's full matrix, its channels and its va…
InauguralPhysicist Oct 15, 2026
0a4748f
phase2 R1.1 fix: the differential v2, the int-source tag check, check…
InauguralPhysicist Oct 15, 2026
cdfb128
phase2 R1.1 fix: keep a signal-killed run's report off the differenti…
InauguralPhysicist Oct 15, 2026
da1d171
Merge origin/main (4afbd15e) into phase2-numbers
InauguralPhysicist Oct 15, 2026
176b3d6
phase2 R1.1 fix 2: #1775's warnings fixed in the callees, at no hot-p…
InauguralPhysicist Oct 15, 2026
076ac7c
One loader for per-program run conditions: suite, jit_diff, replay_di…
InauguralPhysicist Oct 15, 2026
8e1a638
phase2 differential: run conditions, declared nonzero exits, an exact…
InauguralPhysicist Oct 15, 2026
348ab6a
phase2 checker: the inventory's verdict gated, the inventory fresh, n…
InauguralPhysicist Oct 15, 2026
162b392
phase2 R1.1 fix 2: #1775's three warning sites initialised, nothing e…
InauguralPhysicist Oct 15, 2026
9607cfa
smi-trap build: no maybe-uninitialized false positives from the trap …
InauguralPhysicist Oct 15, 2026
f404a60
phase2 differential: SDL's dummy audio device for every run (#1758)
InauguralPhysicist Oct 15, 2026
0ab55f9
phase2 R1.2a: VAL_INT appended, the number tokens renamed with deprec…
InauguralPhysicist Oct 15, 2026
6e38d7e
phase2 tools: the inventory scans only tracked sources; unexpected ca…
InauguralPhysicist Oct 15, 2026
5d8de70
replay_diff: the ledger carries reasons; ledger test_audio.eigs (#180…
InauguralPhysicist Oct 15, 2026
2fa1b7f
phase2 R1.2a follow-up: the C slot test's value renderer has its VAL_…
InauguralPhysicist Oct 15, 2026
3275c91
phase2 slot test: a build warning fails it under gcc only (#1758)
InauguralPhysicist Oct 15, 2026
d2c0ed6
phase2 R1.2b: the bridge and the container helpers admit an int (#1758)
InauguralPhysicist Oct 15, 2026
4661742
phase2 R1.2c: eigenscript.c's number sites, with their final int arms…
InauguralPhysicist Oct 15, 2026
40ef2d8
phase2 R1.2d: migrate the core builtin Value number sites (#1758)
InauguralPhysicist Oct 18, 2026
10849e6
phase2 R1.2e: admit int Values in the tensor bridge (#1758)
InauguralPhysicist Oct 18, 2026
f28b94b
phase2 R1.2f: admit int Values in the buffer bridge (#1758)
InauguralPhysicist Oct 18, 2026
f9e711d
phase2 R1.2g: admit int Values in the host bridge (#1758)
InauguralPhysicist Oct 18, 2026
2fb9b5e
phase2 R1.2h: migrate gfx and audio Value number sites (#1758)
InauguralPhysicist Oct 18, 2026
7038423
phase2 R1.2i: finish the int reader arms scheduled at R1.2a (#1758)
InauguralPhysicist Oct 18, 2026
3f1ff96
phase2 R1.2j: migrate the JIT float guards and standalone emitter stu…
InauguralPhysicist Oct 18, 2026
a0f6638
phase2 R1.2k: give constant deduplication and disassembly exact int a…
InauguralPhysicist Oct 18, 2026
6640b3d
phase2 R1.2l: migrate float tape tokens and retain the v7 int refusal…
InauguralPhysicist Oct 18, 2026
d5ff982
phase2 R1.2m: migrate the store encoder and numeric bridge (#1758)
InauguralPhysicist Oct 18, 2026
2326261
phase2 R1.2n: admit int Values in the embedding number bridge (#1758)
InauguralPhysicist Oct 18, 2026
1a2c4e4
phase2 R1.2o: migrate extension numeric guards and exact database int…
InauguralPhysicist Oct 18, 2026
1822df2
phase2 R1.2p: migrate the C numeric fixtures before alias deletion (#…
InauguralPhysicist Oct 18, 2026
14471e2
phase2 R1.2q: finish the VM Value consumers without a producer (#1758)
InauguralPhysicist Oct 18, 2026
ce66ede
phase2 R1.2z: delete the deprecated Value number aliases (#1758)
InauguralPhysicist Oct 18, 2026
664c28d
phase2 R1.2r: migrate the P4 int-source plant templates (#1758)
InauguralPhysicist Oct 18, 2026
7e5662d
phase2 R1.2s: renew strict shape fingerprints after the Value migrati…
InauguralPhysicist Oct 18, 2026
95ce2fe
phase2 R1.2t: recognize the bool renderer result in the strict differ…
InauguralPhysicist Oct 18, 2026
0b6d967
phase2 R1.2u: report the graphics sanitizer renderer state as a bool …
InauguralPhysicist Oct 18, 2026
7ade7cc
phase2 R1.2v: retire the non-reproducing audio replay fixture row (#1…
InauguralPhysicist Oct 18, 2026
a49ebe5
phase2 R1.2w: record the Value layer's full verification and handoff …
InauguralPhysicist Oct 18, 2026
4cb8f11
Merge origin/main into Phase 2 R1.2 (#1758)
InauguralPhysicist Oct 18, 2026
655546a
phase2: format all fourteen R1.2 changelog fragments (#1758)
InauguralPhysicist Oct 18, 2026
84ec0f2
phase2: schedule the completed exact readers at their first reachable…
InauguralPhysicist Oct 18, 2026
baaa40f
phase2: record the three reader arms completed in R1.2i (#1758)
InauguralPhysicist Oct 18, 2026
56eaaaf
phase2: state the reviewed builtin raw-read exceptions (#1758)
InauguralPhysicist Oct 18, 2026
c045259
docs: name float and int Values in architecture, concurrency and trac…
InauguralPhysicist Oct 18, 2026
e8b78e9
phase2: restore float hot-path cost and gate the complete CodSpeed se…
InauguralPhysicist Oct 18, 2026
90d20c5
phase2: keep durable verification notes in the number design (#1758)
InauguralPhysicist Oct 18, 2026
0c43ec8
phase2: re-key the arm-refusal plant to NUM_CMP's per-operand refusal
InauguralPhysicist Oct 19, 2026
05f7c25
tests: copy every runner-sourced helper into the planner stub (main 0…
InauguralPhysicist Oct 19, 2026
f49576f
vm: DISPATCH drops its popped argument after binding it (#1838)
InauguralPhysicist Oct 19, 2026
5857540
tests: cap the release examples' gfx runs at the 1,500,000 KiB machin…
InauguralPhysicist Oct 19, 2026
d599be7
phase2 R1.3a: the int semantics, before any int value exists (#1758)
InauguralPhysicist Oct 19, 2026
cad3573
phase2 R1.3b: the remaining R1.1/R1.2 placeholders get their final in…
InauguralPhysicist Oct 19, 2026
3dd9f2b
phase2 R1.3c: the observer routes a boxed int into the numeric channe…
InauguralPhysicist Oct 19, 2026
4ee4885
phase2 R1.3d: N1 int literals with tape v7, the first int values (#1758)
InauguralPhysicist Oct 19, 2026
f2053fb
phase2 R1.3e: the R1.3 MAP rows, controls and tier witnesses (#1758)
InauguralPhysicist Oct 19, 2026
520540d
phase2 R1.3f: the cost gate becomes a declared-expectation gate (#1758)
InauguralPhysicist Oct 19, 2026
2b898e2
docs: the int64 kind, num_type and tape v7 (#1758 R1.3)
InauguralPhysicist Oct 19, 2026
db3fbdd
phase2 R1.3g: declare R1.3's measured cost against origin/main (#1758)
InauguralPhysicist Oct 19, 2026
d33b4a9
phase2 R1.3h: the vendored halting-descent corpus program writes its …
InauguralPhysicist Oct 19, 2026
198c191
phase2 R1.3i: the observer oracle's known-wrong int64 verdicts are de…
InauguralPhysicist Oct 19, 2026
55920be
embed_smoke: tape assertions match whole v7 lines (#1758 R1.3 CI)
InauguralPhysicist Oct 19, 2026
f5b7442
stdlib: real-valued formulas stay in floats under int literals; the l…
InauguralPhysicist Oct 19, 2026
d68c8c6
tests: the TSan emitted-JIT fixture writes floats; its int twin is an…
InauguralPhysicist Oct 19, 2026
d261a79
phase2 cost gate: STALE declarations fail; the declarations track the…
InauguralPhysicist Oct 19, 2026
8d08bef
bench: the regression gate honours the declared phase 2 costs (#1758 …
InauguralPhysicist Oct 19, 2026
30e73ee
jit_diff: its verdict no longer depends on the caller's display or lo…
InauguralPhysicist Oct 19, 2026
2a20ace
phase2 inventory: regenerated for embed_smoke.c's moved lines (#1804,…
InauguralPhysicist Oct 19, 2026
6ea3117
Merge origin/main (94657581) into phase2-numbers
InauguralPhysicist Oct 20, 2026
2ca17a2
tests: five JIT-purposed fixtures compile again; their int twins are …
InauguralPhysicist Oct 20, 2026
7f070c6
tests: section [0fp] gates boxed-int ownership strictly leak-clean (#…
InauguralPhysicist Oct 20, 2026
b85a07e
docs: list_get_ref / dict_value_get_ref and the channel copy say what…
InauguralPhysicist Oct 20, 2026
432872d
tests: poisson_pmf pins its float Stirling branch at an int k (k = 14…
InauguralPhysicist Oct 20, 2026
d48ad18
ci: a phase2 workflow runs the MAP rows and the lib differential on p…
InauguralPhysicist Oct 20, 2026
dabe7ce
gates: the enrolment check covers tools/ entry points (mechanical-gat…
InauguralPhysicist Oct 20, 2026
6382b6a
gates: the enrolment self-test copies a tools/ package with BSD cp too
InauguralPhysicist Oct 20, 2026
e6be83c
Add floor division and floor modulo for phase 2 N4
InauguralPhysicist Oct 20, 2026
3bd8c8d
Witness and declare N4 changes in successful stdlib values
InauguralPhysicist Oct 20, 2026
0d6242f
Pin the heap-int domain in floor arithmetic ownership fixtures
InauguralPhysicist Oct 20, 2026
0ebf331
Review floor arithmetic payload reads and bool operand coverage
InauguralPhysicist Oct 20, 2026
d52aa6c
Declare measured R1.4 MOD costs and narrow stale bounds
InauguralPhysicist Oct 20, 2026
2987cc3
Declare the deliberate worker-task exit in the corpus ledger
InauguralPhysicist Oct 20, 2026
596bfd9
Match Python's float-divmod quotient for floor division
InauguralPhysicist Oct 20, 2026
fac59c5
Keep the corrected zero-quotient sign freestanding
InauguralPhysicist Oct 20, 2026
738f8ec
Normalize empty operation headers in floor-division MAP rows
InauguralPhysicist Oct 20, 2026
2d6587e
changes: the #1882 fragment starts with '- ' as the fragment check re…
InauguralPhysicist Oct 20, 2026
7b95a5a
Implement Lua 5.4 integer bitwise results and shift rules (N8)
InauguralPhysicist Oct 20, 2026
40333a2
Close N8 oracle population and language-contract review gaps
InauguralPhysicist Oct 20, 2026
4ac31e6
Record measured N8 costs and interpreter recovery obligations
InauguralPhysicist Oct 20, 2026
3c454cb
Merge origin/main (5a7b703e) into phase2-numbers
InauguralPhysicist Oct 21, 2026
63879ab
Merge origin/main (5bd396c2) into phase2-numbers
InauguralPhysicist Oct 21, 2026
1fd4422
Merge origin/main (0277d7a9) into phase2-numbers
InauguralPhysicist Oct 21, 2026
d2437d6
phase2 R1.6a: preserve the pre-registered builtin bar and rulings (#1…
InauguralPhysicist Oct 21, 2026
0a73adb
phase2 R1.6a: import the author-applied D1/D2 bar rulings (#1758)
InauguralPhysicist Oct 21, 2026
353890d
phase2 R1.6a: add the final readers and opt-in bridge meter (#1758)
InauguralPhysicist Oct 21, 2026
9e6b2ba
phase2 R1.6a: remeasure the inherited allocation cost bound (#1758)
InauguralPhysicist Oct 21, 2026
d18dace
phase2 R1.6a: enforce the frozen builtin table and sub-round gates (#…
InauguralPhysicist Oct 21, 2026
bb75a56
phase2 R1.6a: declare the builtin harness corpus exclusion (#1758)
InauguralPhysicist Oct 21, 2026
f4c6bac
phase2 R1.6a fix: pin and enforce the approved builtin bar (#1758)
InauguralPhysicist Oct 21, 2026
15ba4c1
phase2 R1.6a fix: execute Q7 readers after round e (#1758)
InauguralPhysicist Oct 21, 2026
a41e90a
phase2 R1.6a fix: enrol the corpus ownership helper (#1758)
InauguralPhysicist Oct 21, 2026
21a8818
phase2 R1.6a fix: share corpus harness ownership across walkers (#1758)
InauguralPhysicist Oct 21, 2026
970951b
phase2 R1.6b: import ruled sign_extend and empty min/max bar amendments
InauguralPhysicist Oct 21, 2026
28ff8a6
fix phase2 bar plants outside git (#1897)
InauguralPhysicist Oct 21, 2026
c98b626
phase2 R1.6b: preserve exact numeric builtin results
InauguralPhysicist Oct 21, 2026
949041b
phase2 R1.6b: checked integer tensor arithmetic and sum
InauguralPhysicist Oct 21, 2026
60ce194
phase2 R1.6b: exact store keys and integer record decoding
InauguralPhysicist Oct 21, 2026
4c916ec
phase2 R1.6b: decode PostgreSQL integers without double loss
InauguralPhysicist Oct 21, 2026
1e9ae33
R1.6b: correct http_post LOSS staging under D3
InauguralPhysicist Oct 21, 2026
ba71842
phase2 R1.6b: exact shared counters and complete numeric migration
InauguralPhysicist Oct 21, 2026
229aa1b
Fix handles-MT construction pins for integer generations (#1758)
InauguralPhysicist Oct 21, 2026
c2785b6
Repin reviewed R1.6b strict-shape exemptions (#1758, #1877)
InauguralPhysicist Oct 21, 2026
748d8fd
Recover range construction cost without weakening declarations (#1758)
InauguralPhysicist Oct 21, 2026
1c01e74
Restore random-int calibration after the N3 migration (#1758)
InauguralPhysicist Oct 21, 2026
a97f442
Restore store float serialization and retire stale raw-read pin (#1758)
InauguralPhysicist Oct 21, 2026
3ef9352
Restore alphabetic validation after strict numeric parsing (#1758)
InauguralPhysicist Oct 21, 2026
d4f8e3e
Keep min and max guards visible to the strict census (#1758)
InauguralPhysicist Oct 21, 2026
1ce5ba4
Preserve sum's first strict NaN read contract (#1758, #1417)
InauguralPhysicist Oct 22, 2026
28e98b4
Stop tensor buffer kernels at their first raised result (#1758, #1417)
InauguralPhysicist Oct 22, 2026
3ea01c9
Merge origin/main (88a1c911) into phase2-numbers
InauguralPhysicist Oct 22, 2026
de190a1
phase2 corpus diff: classify changed tests the baseline cannot comple…
InauguralPhysicist Oct 22, 2026
c1dd838
phase2 R1.6c: migrate core integer arguments to final readers (#1758)
codex Oct 22, 2026
45b6c9f
phase2 R1.6c: migrate float-producing core builtins (#1758)
codex Oct 22, 2026
9692a4b
phase2 R1.6c: finish remaining core builtin readers (#1758)
codex Oct 22, 2026
4e77a9d
phase2 R1.6c: migrate hosted numeric builtin boundaries (#1758)
codex Oct 22, 2026
32241bc
phase2 R1.6d: migrate tensor indices and numeric outputs (#1758)
InauguralPhysicist Oct 23, 2026
6418f64
phase2 R1.6d: migrate buffer windows, byte readers and counts (#1758)
InauguralPhysicist Oct 23, 2026
dbf3c8f
phase2 R1.6d: migrate model tokens and complete the d table (#1758)
InauguralPhysicist Oct 23, 2026
35b79d9
test(phase2): pre-register R1.6e-D1 audio channel domain
codex Oct 23, 2026
208ab73
feat(numbers): clip Q7 geometry as whole shapes before rounding
codex Oct 23, 2026
0ea4985
test(phase2): pre-register stored audio sample boundary
codex Oct 23, 2026
bd7d336
fix(numbers): retain edge numerator residuals through Q4 ties
codex Oct 23, 2026
7cc2702
test(phase2): pre-register framebuffer byte data boundary
codex Oct 23, 2026
e842b2b
fix(numbers): make Q7 edge arithmetic independent of long double
codex Oct 23, 2026
e9a03a4
feat(gfx): apply whole-shape clipping and bounded colour readers
codex Oct 23, 2026
6d6cf24
feat(audio): apply bounded Q7 sample conversion at the data boundary
codex Oct 23, 2026
1fae638
feat(gfx): read framebuffer and PPU bytes through Q1
codex Oct 23, 2026
2f172ad
fix(audio): round bounded mixer gain through the Q7 reader
codex Oct 23, 2026
0a902ff
feat(gfx): validate magnitudes and produce declared numeric kinds
codex Oct 23, 2026
01e185a
feat(gfx): finish round e numeric readers and channel domains
codex Oct 23, 2026
6c8e6f5
fix(gfx): validate text height magnitude before replay refusal
codex Oct 23, 2026
f9cb1b9
fix(build): retain network byte helper without amalgamation warnings
codex Oct 23, 2026
8cd369a
chore(phase2): track retired byte reader and refresh numeric docs
codex Oct 23, 2026
19e0513
test(audio): align legacy assertions and shape pins with numeric readers
codex Oct 23, 2026
2ec1059
test(gfx): enroll Q7 pixels in the exact environment population
codex Oct 23, 2026
5c756b2
test(jit): count the enrolled Q7 gfx program in jit_diff's suite-envi…
codex Oct 23, 2026
c325cb7
feat(numbers): declare R1.6e graphics numeric migration landed
codex Oct 23, 2026
8de250a
docs(changelog): file R1.6e's fragment under changed/ in the required…
codex Oct 23, 2026
468d689
test(gfx): skip R1.6e's Q7 pixel proof where SDL2 is absent (#1758)
InauguralPhysicist Oct 23, 2026
edd46dc
test(numbers): pre-register shared store handle refusals (R1.6f-D1)
InauguralPhysicist Oct 23, 2026
fea4b15
fix(store): require exact handle and page identifiers (R1.6f-D1)
InauguralPhysicist Oct 23, 2026
d815bef
fix(http): validate exact ports and return integer shared counts
InauguralPhysicist Oct 23, 2026
fa3a550
test(numbers): pre-register net_send byte refusals before migration
InauguralPhysicist Oct 23, 2026
9d0c596
fix(net): use exact socket, port, count and byte readers
InauguralPhysicist Oct 23, 2026
3f7adcf
test(numbers): declare R1.6f landed and refresh its inventory
InauguralPhysicist Oct 23, 2026
3af36d3
test(http): pin effective-port refusal before config mutation
InauguralPhysicist Oct 23, 2026
81b5c85
fix(http): reject invalid PORT before serving state changes
InauguralPhysicist Oct 23, 2026
ab36d44
test(shapes): refresh five reviewed HTTP and TCP source pins
InauguralPhysicist Oct 23, 2026
e26bdbc
test(handles): pin exact integer store generation publication
InauguralPhysicist Oct 23, 2026
99622b6
test(numbers): run net_send's raw-byte fixture as a mechanical gate (…
InauguralPhysicist Oct 23, 2026
87e0b37
test(numbers): keep the store-handle MAP row's stores under /tmp, sta…
InauguralPhysicist Oct 23, 2026
cc8959d
test(numbers): run server-profile MAP rows on the gate's matched buil…
InauguralPhysicist Oct 23, 2026
59d6bb7
Merge main 858bcc8e into phase2-numbers after R1.6f (#1758)
InauguralPhysicist Oct 24, 2026
f467828
Pre-register N9 Rust oracle, 77 builtin probes and five MAP rows
InauguralPhysicist Oct 24, 2026
c57a272
Implement the N9 width family and unsigned utilities
InauguralPhysicist Oct 24, 2026
bab928d
Land R1.6g and refresh the 310-row numeric inventory
InauguralPhysicist Oct 24, 2026
2ccc77f
test(numbers): declare R1.6g's builtin-registration cost on ten rows
InauguralPhysicist Oct 24, 2026
0f4e7dd
phase2: move the core-TU pin for builtins_int.c; fit one cost row to …
InauguralPhysicist Oct 24, 2026
2ba66cc
Merge main dde78c5c into phase2-numbers after R1.6g (#1758)
InauguralPhysicist Oct 24, 2026
21c56ba
phase2: regenerate the inventory after sync #7 (#1758)
InauguralPhysicist Oct 24, 2026
2673f81
test(numbers): preregister remaining buffer boundary contracts
InauguralPhysicist Oct 24, 2026
3823f0d
refactor(vm): retire numeric bridge at buffer data boundaries
InauguralPhysicist Oct 24, 2026
d671fa6
refactor(runtime): use final numeric readers and IEEE buffer equality
InauguralPhysicist Oct 24, 2026
b948b7e
refactor(containers): retire bridge uses from boxing and facades
InauguralPhysicist Oct 24, 2026
a99b6dd
fix(embed): return stored buffer doubles bit for bit
InauguralPhysicist Oct 24, 2026
60e2f62
test(numbers): migrate C fixtures off the numeric bridge
InauguralPhysicist Oct 24, 2026
5a9ec1d
refactor(numbers): delete the bridge, meter and caller-less helpers
InauguralPhysicist Oct 24, 2026
7d8b91c
test(numbers): preregister structural container self-equality
InauguralPhysicist Oct 24, 2026
db34946
fix(runtime): scan container identity for non-reflexive elements
InauguralPhysicist Oct 24, 2026
b6f9db3
Merge main v0.47.0 into phase2-numbers (sync #8)
InauguralPhysicist Oct 25, 2026
d1efc6b
test(numbers): preregister R1.7 text changes and invariant controls
InauguralPhysicist Oct 25, 2026
971eb2e
feat(numbers): use N6 shortest float text across display and JSON
InauguralPhysicist Oct 25, 2026
0ea1b8d
fix(numbers): preserve N14 record and SQL numeric text
InauguralPhysicist Oct 25, 2026
72c02c1
fix(trace): use N6 shortest number text in tape records
InauguralPhysicist Oct 25, 2026
4d83f1e
fix(compiler): deduplicate float constants by binary64 bits
InauguralPhysicist Oct 25, 2026
20f9d86
docs(numbers): record R1.7 oracles, rulings and exact diff evidence
InauguralPhysicist Oct 25, 2026
e84be06
test(observer): amend CI corpus goldens for N6 (#1758)
InauguralPhysicist Oct 26, 2026
5adf9e5
test(tsan): expect N6 float text from replay workers (#1758)
InauguralPhysicist Oct 26, 2026
6bf51c6
fix(numbers): bound N6 decimal scratch for amalgamation (#1758)
InauguralPhysicist Oct 26, 2026
f7191b7
fix(sort): preserve equal elements on every platform (#1758)
InauguralPhysicist Oct 26, 2026
f406359
fix(observer-oracle): compare N6 printed counts by exact value (#1758)
InauguralPhysicist Oct 26, 2026
cd4bdce
Merge main (dffac840) into phase2-numbers: sync #9 (#1758)
InauguralPhysicist Oct 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 10 additions & 6 deletions .claude/rules/c-runtime-memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ iteration, or a collector that quietly stops working).
record, `store_put` refused to re-insert it, and the caller was told 1).

- **`eigs_json_encode` borrows its argument and `eigs_json_parse_value` returns
an owned ref.** `eigs_json_encode(make_num(x))` leaks the `make_num`; a parsed
an owned ref.** `eigs_json_encode(make_float(x))` leaks the `make_float`; a parsed
Value must be decref'd on *every* path including early returns, and the value
read out of it before the decref. Three of the five call sites in
`ext_http.c` had this wrong (#731) — if you touch one, re-audit the rest.
Expand Down Expand Up @@ -148,11 +148,15 @@ iteration, or a collector that quietly stops working).
- **Container elements are `EigsSlot` storage (#1665 arm D); read them only
through `src/container.h`, and know which getter owns what.** Every rule
below was bought by a real bug during the migration:
- `list_get_ref` / `dict_value_get_ref` return **NULL for a number** by
contract. Test `list_elem_type` / `slot_type` before dereferencing, and
never write `get_ref(...)->type == VAL_NUM` (always false). Ragged tensor
rows crashed `relu`/`gather` this way (B5), and the DMG in-place
register-write fast path silently never fired (B2, +38% Ir).
- `list_get_ref` / `dict_value_get_ref` return **NULL for an immediate
number**, a double or an SMI (`src/container.h`:133 and :137). A boxed
int (|i| >= 2^47, since #1758 R1.3) is a heap slot, so it comes back as a
non-NULL `VAL_INT` Value. Test `list_elem_type` / `slot_type` before
dereferencing. Never write `get_ref(...)->type == VAL_FLOAT` (always
false), and never read `get_ref(...)->type == VAL_INT` as "an int" (it is
true for a boxed int only, never for an SMI). Ragged tensor rows crashed
`relu`/`gather` this way (B5), and the DMG in-place register-write fast
path silently never fired (B2, +38% Ir).
- A view (`list_get_view`, `slot_view`, `EIGS_VIEW`, `BUILTIN_*_VIEW`) is
**stack storage**: never return it, store it, or incref-and-keep it, and
a `BUILTIN_*_VIEW` compound literal dies at its enclosing block. A view in
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/phase2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: phase2

# #1758: landed MAP rows, the pre-registered builtin table on matched
# capability profiles, the C readers and the stdlib differential. The shared
# phase2_check.py helper derives the complete declared MAP prefix.
on:
push:
branches: [phase2-numbers]
workflow_dispatch:

permissions:
contents: read

jobs:
phase2:
name: phase2 (MAP + builtins + readers + lib)
runs-on: ubuntu-latest
timeout-minutes: 60
services:
db:
image: postgres:16
env:
POSTGRES_USER: eigs
POSTGRES_PASSWORD: eigs_test
POSTGRES_DB: eigs_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U eigs"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
DATABASE_URL: postgres://eigs:eigs_test@127.0.0.1:5432/eigs_test
steps:
# Every branch and tag is needed: origin/main and v0.46.0.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Fetch the approved builtin bar object
run: |
git fetch --no-tags origin 0a73adb0612f8612d75393891ae2ba2e1c803663
git cat-file -e '0a73adb0612f8612d75393891ae2ba2e1c803663^{tree}'
- name: Install matched capability dependencies
run: |
sudo apt-get update
sudo apt-get install -y libpq-dev zlib1g-dev libsdl2-2.0-0 libsdl2-mixer-2.0-0 libsdl2-ttf-2.0-0
- name: Build tag, main and branch profiles serially; run the phase2 lane
run: |
set -euo pipefail
export XDG_CACHE_HOME="$RUNNER_TEMP/cache"
make --no-print-directory observer-anchor
anchor="$XDG_CACHE_HOME/eigs-oracle-anchor/$(sha256sum tools/observer_oracle/build_anchor.sh | cut -d' ' -f1)/src/eigenscript"
mkdir -p "$RUNNER_TEMP/main" "$RUNNER_TEMP/tag-profiles"
git archive origin/main | tar -x -C "$RUNNER_TEMP/main"
git archive v0.46.0 | tar -x -C "$RUNNER_TEMP/tag-profiles"
make -C "$RUNNER_TEMP/main" > "$RUNNER_TEMP/main-build.log" 2>&1 \
|| { tail -n 50 "$RUNNER_TEMP/main-build.log"; echo "::error::the origin/main build failed"; exit 1; }
# The table uses matching capability builds; a capability-unavailable
# transcript is a failure, including on the tag (ruling A3).
for profile in server zlib db; do
target="$profile"
[ "$profile" != db ] || target=server-db
make -C "$RUNNER_TEMP/tag-profiles" "$target" > "$RUNNER_TEMP/tag-$profile-build.log" 2>&1 \
|| { tail -n 50 "$RUNNER_TEMP/tag-$profile-build.log"; echo "::error::the tag $profile build failed"; exit 1; }
printf -v "TAG_BIN_${profile^^}" '%s' "$RUNNER_TEMP/tag-profiles/build/$target/eigenscript"
export "TAG_BIN_${profile^^}"
done
export CC_GUARD_LOG="$RUNNER_TEMP/cc-guard.log"
: > "$CC_GUARD_LOG"
for profile in server zlib db; do
target="$profile"
[ "$profile" != db ] || target=server-db
PATH="$PWD/tools/cc-guard-bin:$PATH" make "$target"
printf -v "BRANCH_BIN_${profile^^}" '%s' "$PWD/build/$target/eigenscript"
export "BRANCH_BIN_${profile^^}"
done
# Restore the release alias before the MAP and library checks.
PATH="$PWD/tools/cc-guard-bin:$PATH" make build
bash tools/cc_guard.sh --report
bash tools/phase2_ci.sh "$anchor" "$RUNNER_TEMP/main/src/eigenscript" src/eigenscript
80 changes: 73 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ LDFLAGS := -pie -Wl,-z,relro,-z,now -lm -lpthread
endif

SRC_DIR := src
SOURCES := $(SRC_DIR)/eigenscript.c $(SRC_DIR)/lexer.c $(SRC_DIR)/parser.c $(SRC_DIR)/builtins.c $(SRC_DIR)/builtins_buf.c $(SRC_DIR)/builtins_host.c $(SRC_DIR)/builtins_tensor.c $(SRC_DIR)/fsutil.c $(SRC_DIR)/hash.c $(SRC_DIR)/alloc.c $(SRC_DIR)/state.c $(SRC_DIR)/strbuf.c $(SRC_DIR)/ext_store.c $(SRC_DIR)/fmt.c $(SRC_DIR)/lint.c $(SRC_DIR)/lint_host.c $(SRC_DIR)/chunk.c $(SRC_DIR)/compiler.c $(SRC_DIR)/vm.c $(SRC_DIR)/task.c $(SRC_DIR)/jit.c $(SRC_DIR)/trace.c $(SRC_DIR)/eigs_embed.c $(SRC_DIR)/repl.c $(SRC_DIR)/step.c $(SRC_DIR)/tape_read.c $(SRC_DIR)/bundle.c $(SRC_DIR)/main.c
SOURCES := $(SRC_DIR)/eigenscript.c $(SRC_DIR)/lexer.c $(SRC_DIR)/parser.c $(SRC_DIR)/builtins.c $(SRC_DIR)/builtins_int.c $(SRC_DIR)/builtins_buf.c $(SRC_DIR)/builtins_host.c $(SRC_DIR)/builtins_tensor.c $(SRC_DIR)/fsutil.c $(SRC_DIR)/hash.c $(SRC_DIR)/alloc.c $(SRC_DIR)/state.c $(SRC_DIR)/strbuf.c $(SRC_DIR)/ext_store.c $(SRC_DIR)/fmt.c $(SRC_DIR)/lint.c $(SRC_DIR)/lint_host.c $(SRC_DIR)/chunk.c $(SRC_DIR)/compiler.c $(SRC_DIR)/vm.c $(SRC_DIR)/task.c $(SRC_DIR)/jit.c $(SRC_DIR)/trace.c $(SRC_DIR)/eigs_embed.c $(SRC_DIR)/repl.c $(SRC_DIR)/step.c $(SRC_DIR)/tape_read.c $(SRC_DIR)/bundle.c $(SRC_DIR)/main.c
HOSTED_SOURCES := $(SOURCES) $(SRC_DIR)/ext_gfx.c
MODEL_SRC := $(SRC_DIR)/model_io.c $(SRC_DIR)/model_infer.c $(SRC_DIR)/model_train.c
BINARY := $(SRC_DIR)/eigenscript
Expand Down Expand Up @@ -90,7 +90,7 @@ define AUX_REFRESH
done
endef

.PHONY: db-params-test all build server server-db full http net gfx zlib lib amalgamation tsan test test-changed precheck sandbox-intern-test install install-gfx clean coverage coverage-clean fuzz fuzz-run lsp lsp-asan dap jit-smoke embed-smoke embed-smoke-asan embed-smoke-asan-server embed-smoke-gfx embed-concurrent asan asan-server valgrind pgo poison freestanding-check freestanding-libc-diff asan-http asan-gfx tsan-server tsan-http nativefn-test arming-mt-test embed-roads print-% sigpipe-contract-test sigpipe-partial-test ui-sdl-input-gfx pool-off asan-pool-off pool-off-num pool-off-callenv jit-checked
.PHONY: db-params-test all build server server-db full http net gfx zlib lib amalgamation tsan test test-changed precheck sandbox-intern-test install install-gfx clean coverage coverage-clean fuzz fuzz-run lsp lsp-asan dap jit-smoke embed-smoke embed-smoke-asan embed-smoke-asan-server embed-smoke-gfx embed-concurrent asan asan-server valgrind pgo poison freestanding-check freestanding-libc-diff asan-http asan-gfx tsan-server tsan-http nativefn-test arming-mt-test embed-roads print-% sigpipe-contract-test sigpipe-partial-test ui-sdl-input-gfx pool-off asan-pool-off pool-off-num pool-off-callenv jit-checked smi-trap

# ---- Per-variant objdir engine (#740) -------------------------------------
# The engine's rules are defined before `all`, so pin the default goal.
Expand Down Expand Up @@ -196,7 +196,15 @@ SRC_V_jit-checked := $(HOSTED_SOURCES)
FLAGS_jit-checked := $(CFLAGS) $(DEFS_OFF) -DEIGENSCRIPT_EXT_GFX=1 -DEIGS_JIT_CHECKED $(VERDEF)
LIBS_jit-checked := $(LDFLAGS) -ldl

VARIANTS := release server server-db zlib asan asan-server tsan tsan-server valgrind poison pool-off asan-pool-off pool-off-num pool-off-callenv jit-checked
# #1758: compatibility target for the pre-R1.3 int-source gate. R1.3 retires
# EIGS_SMI_TRAP now that integer literals are producers; slot_as_ptr still
# checks tags through EIGS_SLOT_CHECKED. Historical R1.1/R1.2 calibrations
# build their pinned pre-flip source rather than treating this as a trap.
SRC_V_smi-trap := $(HOSTED_SOURCES)
FLAGS_smi-trap := $(CFLAGS) $(DEFS_OFF) -DEIGENSCRIPT_EXT_GFX=1 -DEIGS_SMI_TRAP -DEIGS_SLOT_CHECKED $(VERDEF)
LIBS_smi-trap := $(LDFLAGS) -ldl

VARIANTS := release server server-db zlib asan asan-server tsan tsan-server valgrind poison pool-off asan-pool-off pool-off-num pool-off-callenv jit-checked smi-trap

# Objects depend on Makefile+VERSION so a flag or version-string change
# rebuilds; header edits are covered by the generated .d files.
Expand Down Expand Up @@ -244,6 +252,51 @@ build/$(SLOT_TEST_VARIANT)/test_container_slots: tests/test_container_slots.c $(
container-slot-test: build/$(SLOT_TEST_VARIANT)/test_container_slots
@echo "Container slot API test built: $<"

# #1758 R1.1: the C slot test (docs/design/phase2-numbers.md 2.5). It includes
# the single-file amalgamation so the static slot classifiers are reachable;
# tests/phase2/slot_layer.sh runs it and compares the entries it examined with
# the population tools/phase2_inventory.py derives. The release flavour turns
# on slot_as_ptr's refusal with -DEIGS_SLOT_CHECKED; ASan turns it on itself.
# Both carry -Wall -Wextra, and the runner fails on any warning: release
# compiles the amalgamation at -O0 and ASan at -O1, the two levels #1775
# found warnings at (and -O0 is about 41 s against -O2's 162 s).
PHASE2_SLOT_VARIANT ?= release
PHASE2_SLOT_FLAGS_release := -Wall -Wextra $(WERROR_FLAGS) -O0 -g -DEIGS_SLOT_CHECKED
PHASE2_SLOT_FLAGS_asan := -Wall -Wextra $(ASAN_FLAGS)
build/phase2/eigenscript_all.c: $(filter-out $(CLI_ONLY),$(SOURCES)) $(wildcard $(SRC_DIR)/*.h) tools/amalgamate.sh Makefile
bash tools/amalgamate.sh build/phase2
build/phase2/slot_layer_%: tests/phase2/slot_layer.c build/phase2/eigenscript_all.c tools/werror_flags.txt
$(CC) $(PHASE2_SLOT_FLAGS_$*) -Ibuild/phase2 -o $@ $< -lm -lpthread
.PHONY: phase2-slot-test
phase2-slot-test: build/phase2/slot_layer_$(PHASE2_SLOT_VARIANT)
@echo "phase2 slot test built: $<"

# #1758 R1.6a: final reader C fixture, through the no-SDL amalgamation.
PHASE2_READERS_VARIANT ?= release
PHASE2_READERS_FIXTURE ?= readers
build/phase2/readers_%: tests/phase2/readers.c build/phase2/eigenscript_all.c tools/werror_flags.txt
$(CC) $(PHASE2_SLOT_FLAGS_$*) -Ibuild/phase2 -o $@ $< -lm -lpthread
# R1.6d-D1: raw stored payloads through the actual graphics/audio readers.
build/phase2/gfx_audio_boundary_%: tests/phase2/gfx_audio_boundary.c src/ext_gfx.c build/phase2/eigenscript_all.c tools/werror_flags.txt
$(CC) $(PHASE2_SLOT_FLAGS_$*) -Ibuild/phase2 -o $@ $< -lm -lpthread -ldl
build/phase2/gfx_byte_boundary_%: tests/phase2/gfx_byte_boundary.c src/ext_gfx.c build/phase2/eigenscript_all.c tools/werror_flags.txt
$(CC) $(PHASE2_SLOT_FLAGS_$*) -Ibuild/phase2 -o $@ $< -lm -lpthread -ldl
# R1.6z-D1 public getter bit-round-trip gate; compile outside timed MAP rows.
build/phase2/embed_buffer_get_raw_%: tests/phase2/embed_buffer_get_raw.c build/phase2/eigenscript_all.c tools/werror_flags.txt
$(CC) $(PHASE2_SLOT_FLAGS_$*) -Ibuild/phase2 -o $@ $< -lm -lpthread
# Q7 lands in R1.6e; an absent source is a build failure once selected.
build/phase2/q7_readers_%: tests/phase2/q7_readers.c build/phase2/eigenscript_all.c tools/werror_flags.txt
$(CC) $(PHASE2_SLOT_FLAGS_$*) -Ibuild/phase2 -o $@ $< -lm -lpthread
# N6: actual shared writer plus Python repr/bit/truncation oracle cases.
build/phase2/num_text_%: tests/phase2/num_text.c build/phase2/eigenscript_all.c tools/werror_flags.txt
$(CC) $(PHASE2_SLOT_FLAGS_$*) -Ibuild/phase2 -o $@ $< -lm -lpthread
# R1.7-D4: signed-zero constant keys are compared by bits.
build/phase2/const_dedup_bits_%: tests/phase2/const_dedup_bits.c build/phase2/eigenscript_all.c tools/werror_flags.txt
$(CC) $(PHASE2_SLOT_FLAGS_$*) -Ibuild/phase2 -o $@ $< -lm -lpthread
.PHONY: phase2-readers-test
phase2-readers-test: build/phase2/$(PHASE2_READERS_FIXTURE)_$(PHASE2_READERS_VARIANT)
@echo "phase2 reader test built: $<"

# Focused lifetime regression for sandbox descriptor interns (#964). Link the
# public embedding/runtime surface without CLI-only translation units so the
# C test can inspect the internal thread-local intern accounting directly.
Expand Down Expand Up @@ -469,13 +522,16 @@ observer-anchor:
# observer-anchor builds, or reuses, in the user cache. FLOOR=<file>, on the command
# line or in the environment, names another floor; an empty FLOOR skips the floor
# and the anchor. EXPECT=ieee,int64 fails when an expected capability is absent
# (#1758). CI calls score.py directly, through tools/observer_oracle/ci_lane.sh
# (the required check `observer oracle (floor)`).
# (#1758). Both pass --declared tests/phase2/oracle_expect.txt: Phase 2's known-
# wrong capability verdicts, each with its recover round (#1830); an undeclared
# wrong verdict or a stale declaration fails, and #1776 merges only when the file
# is empty (tools/phase2_cost.sh --final). CI calls score.py directly, through
# tools/observer_oracle/ci_lane.sh (the required check `observer oracle (floor)`).
.PHONY: observer-oracle
observer-oracle: FLOOR ?= tools/observer_oracle/floor.json
observer-oracle: build
$(if $(FLOOR),$(OBSERVER_ANCHOR))
python3 tools/observer_oracle/score.py src/eigenscript $(if $(FLOOR),--floor $(FLOOR)) $(if $(EXPECT),--expect $(EXPECT))
python3 tools/observer_oracle/score.py src/eigenscript $(if $(FLOOR),--floor $(FLOOR)) $(if $(EXPECT),--expect $(EXPECT)) --declared tests/phase2/oracle_expect.txt

install-gfx: install
@echo "NOTE: 'make install-gfx' is a compatibility alias for 'make install'."
Expand Down Expand Up @@ -503,7 +559,7 @@ $(SRC_DIR)/lsp_stdlib_index.h: $(wildcard lib/*.eigs) tools/gen_lsp_stdlib_index
# Builtin half of the same idea (#742): names from the registration seams +
# ext_names.h, hover detail from the signature comments. Reserved report
# forms are excluded using lexer.c. Commit the generated header for review.
$(SRC_DIR)/lsp_builtin_index.h: $(SRC_DIR)/builtins.c $(SRC_DIR)/builtins_host.c \
$(SRC_DIR)/lsp_builtin_index.h: $(SRC_DIR)/builtins.c $(SRC_DIR)/builtins_int.c $(SRC_DIR)/builtins_host.c \
$(SRC_DIR)/hash.c $(SRC_DIR)/ext_store.c $(SRC_DIR)/ext_names.h \
$(SRC_DIR)/lexer.c tools/gen_lsp_builtin_index.sh
bash tools/gen_lsp_builtin_index.sh
Expand Down Expand Up @@ -716,6 +772,12 @@ jit-checked: build/jit-checked/eigenscript
$(call RELINK,jit-checked)
@echo "EigenScript $(VERSION) (jit-checked: emitted slot witnesses) built. Binary: $(BINARY)"

# #1758 R1.1 (see FLAGS_smi-trap): build it in a scratch tree, then
# tools/phase2_check.sh --through R1.1 --smi-trap <tree>/src/eigenscript ...
smi-trap: build/smi-trap/eigenscript
$(call RELINK,smi-trap)
@echo "EigenScript $(VERSION) (smi-trap compatibility: checked slots; source trap retired in R1.3) built. Binary: $(BINARY)"


# Profile-guided optimization. Builds an instrumented binary, runs the
# DMG cpu_instrs workload to collect branch/edge counters, then rebuilds
Expand Down Expand Up @@ -845,6 +907,10 @@ build/$(HISTORY_BOUNDARY_VARIANT)/test_trace_history_boundary: tests/test_trace_
trace-history-boundary-test: build/$(HISTORY_BOUNDARY_VARIANT)/test_trace_history_boundary
@echo "Trace history boundary test built: $<"

# R1.6d-D1: actual net_send client with raw stored bytes and a real socketpair.
build/phase2/net_byte_boundary_%: tests/phase2/net_byte_boundary.c src/ext_net.c build/phase2/eigenscript_all.c tools/werror_flags.txt
$(CC) $(PHASE2_SLOT_FLAGS_$*) -Ibuild/phase2 -o $@ $< -lm -lpthread

# Witnesses for tools/make_lock_check.sh (#1940). With AFTER set, the recipe
# refuses to run unless that file exists, so a second make proves it started
# only after the first make's recipe wrote its DONE file. SESSION records the
Expand Down
Loading
Loading