fix(compiler): close structural gaps outside the Bastion entrypoints (#366, partial) - #370
Conversation
Apply the pinned OverPy rule-name word filter in its own order, not only for rigger and admin, and pin it with an oracle-backed structural fixture. Refs #366
Generate one program per manifest function, defaulted-argument omission, argument position and small literal in default and optimizeForSize modes, compile each with the pinned OverPy and natively, and compare the parsed canonical programs. Remaining differences are recorded with cause and owner in probe-gaps.json; an unexplained or stale one fails the run. Document the probe and the new lowering behaviour. Refs #366
…tion rewrites as the reference does Fold sin, cos, sinDeg, cosDeg, sqrt, min, max, distance, dotProduct, magnitude, directionTowards, oppositeTeamOf, strContains, stringSlice, stringReplace and indexOfArrayValue on literals, write a folded empty array as Empty Array, and cut every number after fifteen decimals. Write empty HUD text as Null and drop a HUD text with none, wrap a Null Boolean argument in First Of, spell a fractional ultimate charge with Absolute Value, and under optimizeForSize drop the colour of a grapple beam or falsy progress bar and spell an empty separator as an empty array. Each is pinned by an oracle-backed fixture. Refs #366
| /// Words the Workshop refuses in a rule name. Each entry is the text before the | ||
| /// soft hyphen, the text after it, and whether the word must stand alone. | ||
| /// The pinned OverPy applies them in this order, each over the whole name. | ||
| const FILTERED_RULE_NAME_WORDS: [(&str, &str, bool); 28] = [ |
There was a problem hiding this comment.
This core table mirrors the pinned OverPy escapeBadWords replacement table entry-for-entry and in the same order (with the spaced rigger case translated below). #366 explicitly says not to copy OverPy data tables, and docs/compatibility/source-policy.md permits core facts derived from observed oracle behavior, not imported reference implementation/data. Please replace this with an independently derived/justified interoperability representation consistent with that policy (or revise the approved source-policy boundary before landing it); the current direct table translation is outside the Issue contract.
There was a problem hiding this comment.
The table is restated as two word sets, not upstream's entries in upstream's order, and source-policy.md now records it as oracle-observed facts pinned by the fixture. The word set itself cannot be derived without the reference, so keeping it is an owner decision; I left the thread open for that.
🤖 Addressed by Claude Code
…rule-name facts Match each recorded gap by function, variant and diagnostic so an unrelated rejection stays unexplained, and keep the filtered rule-name words as a documented set of observed facts rather than a copy of the reference table. Refs #366
Teakowa
left a comment
There was a problem hiding this comment.
One blocker remains. The gap-matcher finding is fixed, but the rule-name word set still reproduces the substantive upstream table content; regrouping/reordering it does not resolve #366's explicit non-goal against copying upstream implementation tables. The new source-policy.md exception also says it needs owner approval, so it cannot self-authorize this PR. Either land an explicit owner/architecture decision that changes the boundary, or remove this slice from #370 and keep the existing approved behavior.
…ved exceptions Bump workshop-rs to 0.6.3, which accepts any value in a Boolean parameter and the createDummyBot False/True slot. Wrap the values the reference wraps in First Of in a Boolean slot, from the builtin probe's observations, and pin the two exceptions of ADR-0014 with rejection tests. Refs #366, #371, #372
|
Removed the rule-name word set, its fixture and the policy note; behaviour is back to main's (rigger and admin only). Item 1 of #366 stays open pending an owner decision on the source-policy boundary. |
Teakowa
left a comment
There was a problem hiding this comment.
The previous blocker is still unresolved. The latest commits add workshop-rs 0.6.3 plus #371/#372 work, but do not change the rule-name filtered-word implementation or the source-policy exception. #366 still explicitly forbids copying upstream implementation tables, and there is still no separate owner/architecture decision authorizing this table-derived core data. No new blocker found in the #371/#372 increment.
….6.4 Bump workshop-rs to 0.6.4, which accepts any value as the First Of argument, wrap after the size replacements as the reference does, cover the wrapped and unwrapped values with oracle-backed fixtures, pin the omitted-optional-argument exception, and drop the validation gap. Closes #371 Refs #366, #373
Refs #366 (partial; the issue stays open).
Done
First Of(Null)for Boolean slots, fractionalsetUltCharge, hidden outline colour, and size-mode grapple beam / progress bar / empty separator.tools/overpy/probe_builtins.py: probes every catalog-backed builtin (3786 probes, default andoptimizeForSize) against the pinned oracle; differences must be listed intools/overpy/probe-gaps.jsonor the run fails.Not done (all recorded as
openin probe-gaps.json)x - xon vectors):validate_canonical_idsrejects the0the reference emits; needs a workshop-rs decision.validate_canonical_idsrejects values the reference writes (non-Boolean values in Boolean slots; the reference wraps some inFirst Of); workshop-rs.createDummyBotslot lacks a False/True coercion in the catalog; workshop-rs.false/0/[]before folding (opy-rs).Verification
fmt, clippy
-D warnings,cargo test --workspace --all-features,python3 -m unittest discover -s tools/overpy/tests,run_native.py(98 match, 8 pre-existing known-gap), and the probe.