-
Notifications
You must be signed in to change notification settings - Fork 0
Debug Map Schema
Simon B.Stirling edited this page Mar 2, 2026
·
1 revision
I use this document as the frozen compatibility contract for debug-map artifacts.
Contract version: debugmap.v1
Current binary schema (frozen in this contract):
- magic:
L0DM - internal schema version field:
2 - layout:
-
qword[0]: magic (L0DM) -
qword[1]: schema version (2) -
qword[2]:entry_count -
qword[3]:code_size - followed by
entry_counttriplets (inst_id,start,end)
-
mapcat output is frozen as:
entries <count>code_size <bytes>- one repeated 3-line block per entry:
inst_id <id>start <off>end <off>
I freeze deterministic decode for compatibility fixtures in tests/debug_map_schema.sh.
I freeze these strict validation rules for both mapcat and tracejoin:
- magic must be
L0DM - version must be
2 - payload size must be exactly
32 + entry_count*24 -
inst_idmust be nonzero -
inst_idvalues must be strictly increasing - each entry must satisfy
start <= end <= code_size - entry ranges must be monotonic non-overlapping
tracejoin joins by trace_id == inst_id and preserves trace-record order in output.
I enforce compatibility and tamper strictness in:
tests/debug_map_schema.sh
That harness freezes:
- deterministic decode for one-entry and two-entry schema fixtures
- deterministic join behavior for a two-record trace fixture
- strict rejection for tampered map artifacts:
- bad magic
- bad version
- mismatched
entry_count - non-increasing
inst_id - overlapping ranges
- How-To-Write-L0
- Language-Reference
- Instruction-Set
- CLI-and-Compiler-Spec
- Implementable-Spec
- Command-Reference
- Examples-Catalog
- LLM-Quick-Reference
- Opcode-Examples
- LLM-Doc-Index