The oracle's package translator accepts a local operand that names a guard step
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Read crates/ambyte-oracle/src/package/translate.rs and its operand lookup, then find the package translation tests. Start by adding the two-requirement case where the second compares local "" with an input field; verify it currently translates successfully. Pin the edge cases for read bindings and comparison results as the issue requests, and confirm the retained package still has the same events and bound, 1,048,584.
Written by the indexing model from the issue text.
Description
.dag: issue-dag/2
.id: ambyte-lang/ambyte#377
.kind: task
.type: bug
.blocked_by: []
.size_hours: 1
Bug
You are the engineer for this issue. Read all sections of this issue.
Write tests from section 2c (Test Plan) first. Make sure that they fail before you write the code.
Write the code from section 2b. Make sure that all tests pass.
Make sure that each item under Acceptance is true.
Do not change anything that Out of scope names.
Read AGENTS.md and the project's code conventions before you change code.
Run the project's checks as AGENTS.md or the README gives them. Do not use --no-verify.
Open a draft pull request. Link this issue. Write progress comments on the pull request.
Make the pull request ready only when every item under Acceptance and in the Definition of Done is true and CI passes.
Outcome
The reference oracle's package translator refuses a local operand that does not name a value.
Scope
- In
crates/ambyte-oracle/src/package/translate.rs, operand lookup accepts a local operand only when it names an earlier step that produces a value. - A test that fails first: a package with two requirements, the second comparing the local
""with an input field. Today translation succeeds; it must be refused.
Out of scope
- Any change to a tariff price, to the bound recurrence or to the observation of an accepted plan.
- Widening or narrowing the translator's accepted program forms in any other way.
- The package's bound fields: flyingrobots/amblicit#376.
Prerequisites
None.
Safe intermediate state
The translator refuses one malformed shape it accepted before. The retained package is unaffected: it has one requirement and no such operand.
Acceptance
-
local_operand_naming_a_guard_step_is_refusedfails before the change and passes after; the pull request quotes both runs. - The retained package still translates to the same events and the same bound, 1,048,584.
- Whether an operand may name an earlier requirement's generated
<id>/predicateresult is stated in the translator's documentation, with a test either way.
1. Background Context
At f04228df, every translated guard is appended as Op::Require with an empty name (translate.rs:335-339). Operand lookup accepts a local operand that matches the name of any earlier plan step (translate.rs:350-358), and the artifact reader accepts empty text (artifact.rs:55-59).
2. Problem Description
A second requirement whose operand is {"kind":"local","ref":{"id":""}} passes the lookup by matching the preceding guard, which yields no value. This was observed by reading the source during the review of Echo's ruling on the bound U (flyingrobots/echo#1051); it was not run. What plan admission or evaluation then does with such a plan was not traced.
2a. Reproduction
Not run. Expected reproduction: translate a package whose intent has two requirements, the second with the operand above; translation returns a plan.
2b. Proposed Solution
Look operands up among value-producing steps only, or refuse empty names for locals. Rejected: leaving it and relying on later stages, because the translator is the oracle's reader and its refusals define the domain Echo's is compared with.
2c. Test Plan
Golden: the test above.
Edges: a local naming a read binding (accepted); a local naming a comparison result (decide and pin); a local naming nothing (refused today).
Known failure modes: a fix that also refuses the retained package; the second acceptance item guards against it.
Fuzz and stress: not applicable, because the cases are enumerated.
3. Why now
Low urgency. It does not affect witness W9's retained program. It is recorded so the oracle's accepted domain is what its documentation says.
4. Risks
None for the retained program.
5. Definition of Done
Acceptance true.
6. Stakeholders
flyingrobots (owner); Ambyte maintainers.
7. Related Issues
flyingrobots/echo#1051, flyingrobots/amblicit#376.
- 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