Skip to content

Wire frozen tiny XML oracles into offline Idriç compiler acceptance - #74

Open
isomorphisms wants to merge 6 commits into
Idriçfrom
parser/xbrl-canary-73
Open

isomorphisms wants to merge 6 commits into
Idriçfrom
parser/xbrl-canary-73

Conversation

@isomorphisms

@isomorphisms isomorphisms commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Advances #73 with one frozen synthetic XML canary and executable compiler acceptance. The current exact-head compiler receipt is verified, and the PR is ready for review.

Frozen contract — unchanged

The original fixtures/xbrl/tiny-instance.xml, tiny-instance.oracle.json, README.md, and .gitattributes are unchanged by the implementation slice.

  • Exactly 282 ASCII/UTF-8 bytes, including one terminal LF.
  • SHA-256: 936f6516b375941feb1f44ed2cdabfce7ee7d2793f473b0a5c09543a59330b4a.
  • Search NetIncomeLoss: [190,203), [254,267); first match 190.
  • Nine semantic tokens, including every tag/attribute/text span and final offset 282.
  • Data scans [157,163), [239,244), [281,282).
  • Lexical-name tree; root depth 0 misses and depth 1 finds target path [1].
  • Extraction: text [239,244), 18000, integer 18000, context quarter, unit USD. Revenue remains the sibling negative control.

Executable slice

  • XbrlCanary.idric: actual runtime search, finite state/class scanning, tokenizer, bounded tree, lookup and decimal extraction. Reads the supplied file, not the oracle; contains no frozen offsets or numeric answer.
  • xbrl_acceptance.py: fixture integrity; exact checkout/build provenance; isolated network namespace; current-compiler typecheck; one-step ANF emission/inspection; Chez compilation/execution; strict comparison of all four complete oracle objects; eleven deterministic derived runtime controls.
  • _/tests/xbrl/test_acceptance.py: sixteen host harness tests, explicitly separate from compiler execution. The added regression test covers the compiler's lowering of nullary enum dispatch to %constalt(...) in ANF.
  • .github/workflows/ci-edric-build.yml: check out the actual PR head, retain the existing fresh compiler bootstrap/focused tests, then run acceptance with networking disabled and upload its receipt/logs/artifacts even on failure.
  • fixtures/xbrl/ACCEPTANCE.md: commands, bounds, stage contract and limitations.

The four positive controls change income, change Revenue, prepend whitespace to shift offsets, and swap siblings. They compare complete derived observation objects. Seven rejection controls cover missing target, ampersand, mismatched close, truncated root, non-ASCII input, depth overflow and byte overflow. These are temporary probes derived from committed bytes, not live retrieval or new promoted corpus fixtures.

Receipt and scope

Every required stage must pass. Missing, skipped or failed stages cannot produce overall PASS; downstream unexecuted stages remain SKIP. A new attempt removes previous outputs. The receipt binds checkout/tree, source, fixture, oracle, runner, compiler/library manifest and emitted one-step artifact.

Current implementation head: da5a3c9e0aacd44b9de81231c8f727c0dc0e8fc8.

Run 34059620652 completed against prior head 8b6bb9ada06719a6d4ae0e6a39394b1d5e6e88ef: source layout, harness preparation, fresh compiler bootstrap/focused tests and core typecheck passed. compiler_ir alone failed with missing dispatch alternative: DataState. The retained one-step artifact contains the real state_class_step case tree, but this ANF representation lowers the nullary ScanState/ByteClass constructors to numeric %constalt(...) branches, so their source names do not survive. Commit da5a3c9e repairs only that representation-sensitive inspection: it still requires the exact source/compiler binding, nested finite dispatch, byte classification, scanner-to-dispatch call and recursive scan loop.

Current exact-head rerun: source-layout run 34095911886 and build/acceptance run 34095911889 both completed successfully against da5a3c9e0aacd44b9de81231c8f727c0dc0e8fc8. Retained artifact xbrl-acceptance-da5a3c9e0aacd44b9de81231c8f727c0dc0e8fc8-34095911889 (artifact 10008861488, archive SHA-256 17939869ae82afcc44bef79a388f3fa71340cb5e0bd68b00307ead84e2c29554) records overall PASS, with every required stage PASS. The emitted program.one-step (SHA-256 3d776698f0cbd2a489aee6266757ef1da400fbc05a2417348314ca91873e8a19) is bound to the exact source and compiler head; its actual ANF definitions contain the repaired numeric %constalt(...) finite dispatch, byte classification, scanner-to-dispatch call and continuing scan_loop. Linux/Chez execution against the frozen fixture produced all four complete observation objects exactly matching the oracle, and all eleven derived controls passed inside the isolated network namespace. This is the verified current-head compiler acceptance receipt.

The IR check is an ANF workload/structure witness, not a new first-class bulk-scan intrinsic or native instruction-selection proof. Runtime acceptance uses Linux/Chez. ARM/Thumb and follower backend execution remain NOT_VERIFIED, with no backend checkpoint advancement.

Boundary

No DNS, HTTP, SEC/EDGAR, taxonomy or other live lookup is part of fixture/compiler acceptance. Existing host-toolchain installation is separate preparation. XML namespace expansion, XBRL context/unit/taxonomy validation, entities, self-closing tags, declarations, comments, CDATA, recovery and real SEC input remain out of scope. Bounds: 4096 input bytes, 64 tokens, eight attributes per start tag and eight element levels.

@isomorphisms isomorphisms changed the title Freeze tiny XBRL/XML parser canary Wire frozen tiny XML oracles into offline Idriç compiler acceptance Sep 6, 2026
@isomorphisms
isomorphisms marked this pull request as ready for review September 7, 2026 17:40
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