Claim Match-arm binders as fresh identities in the v3 order judgment
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
Start in crates/amblicit-syntax/src/target_ir/execution_order.rs around line 297 and read the v3 order judgment, then inspect the three isolated probes described in the issue. Add refusal witnesses for each reused identity and a passing witness for a fresh Match binder; update TIR-REQ-060, its test-plan rows, and the named caveat references. Decide whether the String-scrutinee case belongs here or in a separate issue. Done means the specified cargo test and cargo xtask verify pass after PR #303 merges.
Written by the indexing model from the issue text.
Description
Size: small (under 4 hours). One issue, one PR.
Problem
The structured Target v3 order judgment claims fresh identities for instruction results, obstruction binders and loop binders, but a CoreExpr::Match arm binder is introduced without being claimed. At crates/amblicit-syntax/src/target_ir/execution_order.rs#297@cebf7da the binder goes through introduce but not claimed. So an identity can appear twice in one intent and still pass the judgment.
This was found during the Baker Street review of PR #303 (cross-examination row 6). Each probe below was isolated through encode_target_ir_artifact, and each was admitted:
- A Match in root
binding.2whose binder reuses nestedlocal.2, which is out of scope at that point. - A Match in
binding.0whose binder reuses the later loop binder id. - A Match in
binding.2whose binder reuses the loop binder id.
The same change made on both the Core and Target sides also passes emit_result_projection. Whether this matters at runtime is unproven: the scopes are disjoint, so it may be harmless.
There is also an open question to settle here. In the same probe, a Match with case "some" over a String scrutinee was admitted at this layer.
Outcome
Under echo.span-ir/v3, a Match arm binder that reuses any identity already claimed in the intent refuses with InvalidCoreIdentity, detail identity_not_fresh or the existing equivalent, and produces no artifact.
Scope
- Claim Match arm binders in the v3 order judgment.
- Add RED/GREEN witnesses: each of the three probes above must refuse, and a fresh Match binder must still lower and encode.
- Update TIR-REQ-060 and its test-plan rows. Narrow or remove the "not Match-arm binders" caveat that PR #303 added to
docs/topics/result-projections/README.mdandcrates/amblicit-syntax/src/result_projection/structured.rs. - Answer the String-scrutinee question: either file it separately, or show here that it is refused where it should be.
Exclusions
- Flat v1/v2 lowering.
- Result-projection source rules.
- Provider behavior.
Acceptance
cargo test --locked -p amblicit-syntax --test target_ir, including the new cases.cargo xtask verify.
Prerequisite
PR #303 must be merged first, because it adds the caveat this issue removes.
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from flyingrobots/edict
-
Update Wasmtime to 48.0.11 for RUSTSEC-2026-0648Possibly taken @flyingrobots claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
flyingrobots/edict#457 ·
-
enhancement type: goalpost
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
flyingrobots/edict#355 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
flyingrobots/edict#306 ·
-
enhancement type: goalpost
Difficulty 4/5 3-5 days Newbie friendliness 42/100
flyingrobots/edict#451 ·
-
enhancement release:target-ir
Difficulty 5/5 Over a week Newbie friendliness 28/100
flyingrobots/edict#450 · 1 comment · 1 reaction ·
All issues in flyingrobots/edict
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
autofixer: follow-up triage: bug triage: classified triage: correctness triage: has-reproducer
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
tursodatabase/turso#13221 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
O-windows relnotes relnotes-needs-review relnotes-tracking-issue T-libs
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
approved
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
fritzprix/libr-agent#3266 ·
Maintainers usually reply within 1 day