The settlement harness omits coverage evidence and derives keys before the stale check

Open
#395 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
testing

Research direction

Start with crates/ambyte-oracle/src/harness/settle.rs and crates/ambyte-oracle/src/harness.rs, especially run_tick; the issue identifies the current coverage and stale-check paths. Read rule P7 and Table 8, then trace the named composition tests and settlement fixtures. Done when failed and aborted observations retain uncovered dependency evidence, stale candidates skip the key function, and the specification names the new witnesses.

Written by the indexing model from the issue text.

Description

enhancement type: goalpost
.dag: issue-dag/2
.id: ambyte-lang/ambyte#395
.kind: task
.type: bug
.blocked_by: []
.size_hours: 3

Compute coverage evidence on failed and aborted observations, and check the basis before calling the key function

Outcome

The reference oracle's tick computes coverage evidence for every complete observation, keeps it when a peer's violation aborts the tick, and compares the basis before it calls the key function, as rule P7 and Table 8 require.

Scope

  • crates/ambyte-oracle/src/harness/settle.rs and crates/ambyte-oracle/src/harness.rs (run_tick).
  • Finding 1, coverage evidence. Rule P7 (Section 1.5) requires a host of the typed-atom profile to validate the coverage of the atom dependencies of a failed observation and record the uncovered ones beside the disposition, and to keep that evidence when a peer's violation leaves the candidate Aborted. Echo's ruling C007 ("Coverage on failed observations") requires the same for every complete observation. At 32530e87, settle returns at a language failure before computing coverage (settle.rs:16-21), and on the abort path run_tick records Aborted and returns without computing it (harness.rs:338-357, Aborted at :351, return at :354). TickReport holds only decisions and observations (harness.rs:256-261).
  • Finding 2, stale before keys. Table 8 puts the stale check (D2) before keys. At 32530e87, run_tick calls the key function (harness.rs:305) before it compares the basis (:306). With a pure key function the disposition is the same, so the existing tests n2_stale_candidate_is_refused_before_key_contention (tests/composition.rs:508) and n2_stale_candidate_before_fresh_does_not_block_key (:609) cannot detect the order.

Out of scope

  • Replacing rule P7's relation (the specification change for flyingrobots/echo#1102).
  • Echo's implementation.

Prerequisites

None.

Safe intermediate state

Each finding is fixed separately; dispositions do not change.

Acceptance

  • A failed observation with an uncovered atom dependency is Failed, and the report carries the uncovered dependency.
  • The same observation with a violating peer is Aborted, and the report keeps its observation and the uncovered dependency.
  • A harness witness whose key function records each call shows that a stale candidate's key function is not called.
  • The same uncovered atom dependency gives Failed with the evidence in one settlement fixture, and Aborted with the complete observation and the evidence in another where a peer violates.
  • The specification's P7 record names these witnesses in place of "Limit: not tested".

Evidence

Found by independent counsel (codex) in rounds 1 and 2 of the council on flyingrobots/echo#1102, at flyingrobots/amblicit a1d7a991 and 32530e87; line numbers above are at 32530e87. Echo's ruling C014 (K3 and K4) records that P7 requires this evidence and that the oracle is to be corrected against it.

Dominant language
Rust
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from flyingrobots/edict

All issues in flyingrobots/edict

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.