Skip to content

feat(opy): complete enum and constant domain coverage - #334

Merged
Teakowa merged 7 commits into
mainfrom
codex/issue-330
Sep 20, 2026
Merged

Teakowa merged 7 commits into
mainfrom
codex/issue-330

Conversation

@e54-bot

@e54-bot e54-bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • resolve pinned Math spacing, newline, and radius constants
  • lower OverPy source-only light color aliases through canonical rgb
  • match pinned OverPy 9.7.10 Texture setup entity selection and boolean String Slice count
  • decode formatted named string entities through the native compiler path
  • compare the texture/entity fixture at the semantic-WIR boundary

Owner dependency

This branch pins workshop-rs commit 8493e8a from workshop-rs#243, which supplies the canonical catalog contracts for EntityId setup values, Boolean String Slice counts, Boolean Create Dummy Bot slots, EntityId string operations, and Empty Array split separators.

Verification

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --workspace --all-targets --all-features
  • python3 -m unittest discover -s tools/overpy/tests
  • python3 tools/overpy/run_native.py --allow-inconclusive: 69 fixtures; 59 match, 9 known-gap, 1 unsupported; texture/entity fixture is a semantic-WIR match
  • python3 crates/opy-rs/src/manifest/probes/validate.py: 46/46 pinned probes match
  • pinned OverPy 9.7.10 focused corpus comparison
  • ablation: removing Color source-domain lowering makes the regression fail with unknown-enum-member
  • ablation: disabling Texture lowering makes the pinned compiler test fail with unsupported-member
  • ablation: disabling named string-entity decoding makes the pinned compiler test lose the formatted ■ marker

Fixes #330

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two blocking gaps remain against #330:

  1. crates/opy-rs/src/lower/expressions.rs — #330 explicitly includes the pinned Texture surface, but member lowering still has no Texture.* path. Pinned OverPy 9.7.10 lowers these constants with texture-tag setup; valid source remains unsupported here. Implement the pinned Texture namespace with independent oracle/differential evidence before closing #330.

  2. crates/opy-rs/src/lexer.rs — #330 also requires named string entities. Pinned OverPy decodes \&name; through opyStringEntities and rejects unknown entities; the current lexer treats \& as an ordinary unknown escape and leaves the entity text literal. Implement the pinned entity surface and structured invalid-entity diagnostics with differential coverage.

CI is green, but it does not exercise these two required surfaces, so the Fixes #330 completion claim is not yet established.

e54-bot pushed a commit that referenced this pull request Sep 19, 2026
@e54-bot
e54-bot requested a review from Teakowa September 19, 2026 15:28

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two blocking issues remain in the follow-up:

  1. crates/opy-rs/src/lower.rs (texture_setup_rule) does not preserve pinned OverPy texture setup semantics. Upstream creates the temporary entity with getAllHeroes() and dynamic team selection, then derives __holygrail__ with replace(...).substring(126, true). This implementation fixes Tracer/Team 1 and finally assigns a dummy player entity directly to __holygrail__. The resulting texture placeholder is therefore not the upstream delimiter value and can also fail when Team 1 cannot host the dummy. Please lower the evidenced setup behavior rather than matching a few output fragments.

  2. crates/opy-rs/src/lexer.rs adds entity decoding only to the normal decoded token value, but f strings are parsed from Token.raw in parse_f_string. That path has no \&entity; handling, so e.g. f"\&black_square; {x}" still produces literal &black_square; instead of ■. Upstream unescapes the string before formatted-string tokenization. Cover the formatted-string path too.

The 93 Texture entries and 67 named string entities themselves match the pinned 9.7.10 inventories, and the latest CI run is green. The remaining failures are semantic/evidence-path issues, not inventory completeness.

Teakowa commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Owner follow-up for the texture setup blocker:

workshop-rs v0.4.1/current main rejects the upstream-required All Heroes argument because createDummyBot.hero is modeled as Hero rather than the evidenced single-Hero/hero-array contract. This is a canonical Workshop validation gap, not something opy-rs should bypass.

Tracked in wrightkit/workshop-rs#238. Please keep the upstream-compatible texture setup in opy-rs, depend on the released owner fix, then re-run the differential evidence.

The separate f-string named-entity finding remains local to opy-rs.

e54-bot pushed a commit that referenced this pull request Sep 19, 2026
Fixes #330

Address remaining review findings on #334.
@e54-bot
e54-bot requested a review from Teakowa September 19, 2026 18:19

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One blocking verification gap remains against #330.

The implementation paths from the previous findings are now present: workshop-rs v0.4.2 is consumed, the texture setup uses the widened Create Dummy Bot contract, and formatted strings decode named entities. However, neither surface is covered by the independent pinned-oracle/differential corpus.

crates/opy-rs/tests/differential-expectations.json, crates/opy-rs/tests/differential.rs, and tools/overpy/compiler-expectations.json contain no Texture or named-string-entity case. The new coverage in catalog_lowering.rs / string_literals.rs is implementation-authored and only asserts native output.

This matters for Texture because the native setup still deliberately differs from pinned OverPy in observable structure (for example filtered dummy-player lookup vs Last Created Entity, and a large numeric String Slice count vs upstream True). Those differences may be semantically acceptable, but the current self-test cannot establish that.

Please add pinned-oracle differential evidence that exercises at least one Texture.* member through the injected setup and a formatted \&entity; string, then perform the required ablation against that independent evidence. With that in place, the prior implementation findings are otherwise resolved.

@e54-bot
e54-bot requested a review from Teakowa September 19, 2026 18:51

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pinned oracle fixture is now present and covers both Texture.MOUSE_CURSOR and formatted named entities, but the Texture compatibility blocker is not resolved yet.

  1. crates/opy-rs/src/lower.rs still differs from the newly pinned oracle in observable behavior. The oracle uses Last Created Entity throughout the setup, while native renames all filtered dummy players and then uses the first filtered dummy. With pre-existing dummy bots this can mutate/select the wrong entity. The oracle also emits String Slice(..., 126, True) (count = 1), while native passes 999999999999, which returns the remaining suffix rather than the single delimiter character. These are semantic differences, not formatting differences.

  2. The new fixture is declared as comparison: "compiler-contract". tools/overpy/diff.py treats that mode as accepted-gap with the reason compiler parity is outside the declared compiler contract, so the green compatibility gate does not establish equivalence here. The Rust test only checks a few shared substrings and therefore passes despite the two mismatches above.

Please make the native setup semantically match the pinned oracle for entity selection and slice count, then have the independent fixture assert that behavior at an appropriate comparison boundary. Also record/run the required ablation against this independent evidence; the PR body still only documents the earlier Color ablation.

The formatted named-entity path itself is resolved.

@e54-bot
e54-bot requested a review from Teakowa September 19, 2026 19:48
@e54-bot

e54-bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up pushed in d2291d9. The Texture setup now uses Last Created Entity for both rename actions, First Of(Last Created Entity) for string derivation/replacement, and String Slice(..., 126, True). The fixture is now semantic-wir with semanticEquivalent=true, and the independent gate reports 69 fixtures / 59 matches / 9 known-gaps / 1 unsupported; texture/entity is a semantic-WIR match. Owner catalog contracts are pinned to workshop-rs#243 commit 8493e8a. Required Texture and named-entity ablations both fail the independent pinned compiler test when disabled and were restored. Hosted CI is green on the new head.

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two prior Texture findings are resolved on this head: native now uses Last Created Entity, preserves the boolean String Slice(..., 126, True) count, and the pinned texture/entity fixture is enforced through semantic-wir; hosted CI is green.

One cross-repo blocker remains: this PR now pins workshop-rs commit 8493e8a from open PR wrightkit/workshop-rs#243, and that owner PR still has an unresolved REQUEST_CHANGES finding. Its catalog currently widens String Replace Search to EntityId even though the pinned OverPy setup uses the split-array Global.__holygrail__ as Search and only the replacement is entity-derived. The owner regression also invents an EntityId Search value, so that canonical widening is not independently established.

Please resolve workshop-rs#243 first, then update this PR to the accepted owner revision/release and rerun the semantic-WIR gate. No additional opy-rs-local finding remains.

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workshop-rs owner blocker is resolved: #243 removed the unsupported EntityId widening from String Replace Search, updated the regression to the pinned shape, was approved, and is now merged.

Two follow-up items remain on this head:

  1. Cargo.toml / Cargo.lock still pin workshop-rs 8493e8a, which is the pre-fix #243 revision that still contains the rejected Search widening. Update to the accepted merged owner revision (a104cf7 or a later released revision containing #243), then rerun the compiler compatibility gate.

  2. Current CI run 640 fails in test_fixture_manifest_owns_concrete_test_declarations: synthetic/texture-entity-compat/fixture.json still contains the retired generic provenance field. The current fixture contract explicitly rejects provenance; synthetic fixtures such as strings-and-lambda carry only their concrete test declarations. Remove that stale field rather than weakening the test.

The prior Texture/entity implementation findings themselves remain resolved.

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Teakowa
Teakowa merged commit 3c7ede9 into main Sep 20, 2026
5 checks passed
@Teakowa
Teakowa deleted the codex/issue-330 branch September 20, 2026 08:20
@e54-bot e54-bot mentioned this pull request Sep 20, 2026
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.

Complete OverPy enum, constant, texture, string-entity, and contextual-domain coverage

2 participants