chore: update coverage stats and badges#17
Merged
Conversation
matthewevans
enabled auto-merge (squash)
April 8, 2026 16:43
matthewevans
added a commit
that referenced
this pull request
Jul 11, 2026
Move item emission from the category-ordered parsed_abilities_to_doc_ir into the dispatch loop + preprocessors, so lower_oracle_ir's order-preserving fold yields printed-source-ordered category vectors and commit-1's finish() per-category counters resolve the CR 707.9a printed slot correctly. Mechanism: - DocEmitter (single-authority emission surface) owns OracleDocBuilder + the per-line ordinal allocator (next_ordinal_for_line). Every non-Class emission routes through it at the item's exact source line: ~96 dispatch-loop sites, the 4 preprocessors, and 4 post-loop singletons. Each typed method does begin_item(exact_span, Some(fragment)) + emit. - Preprocessors return source-line-tagged items ((line, def) tuples), emitted in numeral/push order: saga multi-numeral chapters get ascending ordinals on the shared (first_line, start_byte) key (CR 714.2c); the ETB replacement anchors at chapter-1's line; leveler block-summary statics span header..=max(mod_lines) via emit_span (avoids OverlappingSiblingSpans); spacecraft/attraction emit at their body/continuation line. - last_ability() peeks the builder's spells_emitted stack (pop-aware); last_trigger/last_static are clone-on-emit slots. pop_last_spell / mutate_last_spell re-emit at the item's ORIGINAL span+ordinal. - The 4 reconciles + swallow audit relocate post-fold into lower_oracle_ir(ir, types); swallow diagnostics direct-append to parse_warnings (OracleDocIr.diagnostics bypass parked, ISSUES #17). - Class path keeps the whole-document shim (parsed_abilities_to_doc_ir), gate hoisted above the pre-loop blocks so the shim can't drop builder items. Gates: rung-1 printed-order 6/6 FAIL->PASS; exactly 13 vector-reorders across the 12 census cards, zero unexpected movers (content unchanged, order only); 58 _ir snapshots WholeDocument->Exact (bulk regen), 0 _lowered drift; 94-card multi-numeral Saga guard parses (Long List of the Ents 6, City of Death 6), 0 corpus-wide emit panics; printed_ability_order.rs wired in, 6/6 green.
andriypolanski
pushed a commit
to andriypolanski/phase
that referenced
this pull request
Jul 11, 2026
…ability slots (phase-rs#5538) * refactor(parser): late-bind CR 707.9a printed-slot resolution to finish() Resolve RetainPrinted{Trigger,Ability}FromSource.source_{trigger,ability}_index from each item's final vector position at OracleDoc::finish(), instead of stamping it at parse time via from_category_vector_len(). Producers now emit placeholder() (index 0); an exhaustive finish()-time walk re-stamps the real slot per category. Byte-identical: parsed_abilities_to_doc_ir still emits in category order, so the per-category slot counters reproduce the old from_category_vector_len values exactly (17/17 copy-except cards unchanged; 5 carry the discriminating non-zero index 1). This decouples the slot from construction order so a later commit can reorder items into printed order without breaking the copy-except binding (CR 707.9a: a copy that gains "this ability" binds by the printed ability slot). The stamping walk is exhaustive over Effect / CastingPermission / OracleNodeIr with no `_` arm: a future mod-carrier or slot-bearing node compile-errors instead of silently missing a slot. Over-visited non-receiver carriers are pure pass-throughs (stamp_retained_mods rewrites only the two RetainPrinted variants). Tests: become_copy_except / token_copy_except resolve printed slot 1 at finish(); class-level become-copy threads the trigger index through the full pipeline. * refactor(parser): unit-4 c2 groundwork — per-line ordinal allocator + DocEmitter Adds the source-order emission infrastructure the u4-commit2 cutover wires: - OracleDocBuilder::next_ordinal_for_line: the single, category-blind per-line ordinal_within_span authority (BTreeMap<usize,u32>). Every emitter draws its ordinal here so no two items on one line collide on the (first_line,start_byte, ordinal) map key (CR 714.2c multi-numeral Saga lines, push_same_is_true_* static+ability, casting_option+trigger, the Saga ETB replacement). - DocEmitter: the single-authority source-order emission surface that replaces category-ordered parsed_abilities_to_doc_ir on every non-Class path. Each typed method does exactly begin_item(exact_span, Some(fragment)) + emit(node); ordinal from the one allocator; pop/mutate_last_spell re-emit at the item's ORIGINAL span+ordinal (the key take_last_spell just freed); card-data keywords use a zero-width Exact anchor; whole_document stays Class-shim-only. Both are dead_code-annotated until the dispatch-loop/preprocessor cutover wires them in the following commit. No behavior change (nothing constructs DocEmitter yet). * refactor(parser): source-order Oracle emission cutover (unit-4 c2) Move item emission from the category-ordered parsed_abilities_to_doc_ir into the dispatch loop + preprocessors, so lower_oracle_ir's order-preserving fold yields printed-source-ordered category vectors and commit-1's finish() per-category counters resolve the CR 707.9a printed slot correctly. Mechanism: - DocEmitter (single-authority emission surface) owns OracleDocBuilder + the per-line ordinal allocator (next_ordinal_for_line). Every non-Class emission routes through it at the item's exact source line: ~96 dispatch-loop sites, the 4 preprocessors, and 4 post-loop singletons. Each typed method does begin_item(exact_span, Some(fragment)) + emit. - Preprocessors return source-line-tagged items ((line, def) tuples), emitted in numeral/push order: saga multi-numeral chapters get ascending ordinals on the shared (first_line, start_byte) key (CR 714.2c); the ETB replacement anchors at chapter-1's line; leveler block-summary statics span header..=max(mod_lines) via emit_span (avoids OverlappingSiblingSpans); spacecraft/attraction emit at their body/continuation line. - last_ability() peeks the builder's spells_emitted stack (pop-aware); last_trigger/last_static are clone-on-emit slots. pop_last_spell / mutate_last_spell re-emit at the item's ORIGINAL span+ordinal. - The 4 reconciles + swallow audit relocate post-fold into lower_oracle_ir(ir, types); swallow diagnostics direct-append to parse_warnings (OracleDocIr.diagnostics bypass parked, ISSUES phase-rs#17). - Class path keeps the whole-document shim (parsed_abilities_to_doc_ir), gate hoisted above the pre-loop blocks so the shim can't drop builder items. Gates: rung-1 printed-order 6/6 FAIL->PASS; exactly 13 vector-reorders across the 12 census cards, zero unexpected movers (content unchanged, order only); 58 _ir snapshots WholeDocument->Exact (bulk regen), 0 _lowered drift; 94-card multi-numeral Saga guard parses (Long List of the Ents 6, City of Death 6), 0 corpus-wide emit panics; printed_ability_order.rs wired in, 6/6 green. --------- Co-authored-by: matthewevans <matthewevans@users.noreply.github.com>
nickmopen
pushed a commit
to nickmopen/phase
that referenced
this pull request
Jul 12, 2026
…(ISSUES phase-rs#17) (phase-rs#5650) The swallow audit's input is the assembled `ParsedAbilities`, so it cannot run before the fold — but that is a reason to hand it the doc's diagnostics channel as its sink, not a reason to give it a private one. Since the reconcile-seam relocation it direct-appended to `result.parse_warnings` after `finish()` had sealed `OracleDocIr.diagnostics`, so the doc IR — the parser's single warning channel — never carried a swallowed clause. `lower_oracle_ir` now takes `&mut OracleDocIr`, the audit emits into `ir.diagnostics`, and `parse_warnings` is assigned once, from that channel, at the end. Plan 02 builds a unit-keyed audit on top of this channel and forbids a parallel warning path; this makes that invariant true rather than aspirational. Byte-identical by construction: the vector is built in the same order (parse-time diagnostics, then swallow diagnostics), the audit's sink is push-only (no detector reads it), and none of the six post-fold relation passes touch `parse_warnings`. Verified on the full pool — 35,396 faces, export sha b18035f9bb5699766657cb15058293998d67d7ea9ebfa656a9d0a731a129adb3, identical to the pristine origin/main baseline (98,198,576 B). The regression test is pinned to a pool-verified card: Intermediate Chirography carries a live Duration_ThisTurn swallowed clause in shipped card-data (phase-rs#5638). It was watched go red against the restored bypass ("got []"), so it cannot pass vacuously. Co-authored-by: matthewevans <matthewevans@users.noreply.github.com>
lgray
added a commit
to lgray/phase
that referenced
this pull request
Jul 14, 2026
The prior planning docs describe an engine that no longer exists. Re-measured every load-bearing citation against main @ efc76ca (the docs were written against a tree 768 commits behind) and two central claims are refuted: - "there is no live object-growth path" -> FALSE. try_offer_object_growth_shortcut drives the captured recast on a clone (game/engine.rs:1656). - "the offer carries no iteration count" -> FALSE. ShortcutDecisionSchema .iteration_count: IterationCount::{Fixed,UntilLethal} (decision_template.rs:203). PR-7 shipped ~90% of the spec. The live blocker is REACHABILITY, not capability: fire_time_conditions_read_growing_class (resource.rs:1457, consumed by two gates) vetoes if ANY object in scope trips ability_reads_sibling_mutable -- and sibling:true is the fail-closed DEFAULT for typed filters (ability_scan.rs:2420, "stay CONSERVATIVE"). 84 such sites on main (54 Axes::CONSERVATIVE + 30 sibling:true). Each is individually rules-correct; the firewall is a disjunction over ~100 Commander permanents, so composed they veto by construction. The suite missed it because its fixtures build boards that cannot exist (no lands, empty library). New: LOOP-SHORTCUT-SPEC-AND-STATE.md -- spec, verified CR/MTR layer, what main already does (do not rebuild), why it never fires, and the one experiment that decides the rest (stub the firewall to always-accept, port the fixture, run it). The six prior docs are banner-marked STALE (historical only; rules reasoning and soundness rules still good, code facts not). Also repaired their internal integrity first, so the archive is at least self-consistent: Appendix B now runs 1..19 in order (phase-rs#18 was filed before phase-rs#17, and phase-rs#19 was an IOU), the MTR addendum no longer sits above the section titled "READ THIS FIRST", and the error count is no longer simultaneously 17, 18, and 19 in one document. Assisted-by: ClaudeCode:claude-opus-4.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated update of README coverage badges from latest card data.