Skip to content

feat: add deterministic text_retrieve workload across local execution, routing, and validation - #51

Merged
Exohayvan merged 6 commits into
mainfrom
ai/next-step-20260630-041158
Jun 30, 2026
Merged

Exohayvan merged 6 commits into
mainfrom
ai/next-step-20260630-041158

Conversation

@Exohayvan

Copy link
Copy Markdown
Contributor

Objective

Add a deterministic text_retrieve workload to the existing local-only prototype so the mesh can execute a realistic AI-adjacent ranking task end-to-end (runner -> scheduler -> validation -> ledger) while keeping the change local, testable, and auditable.

This matters because it expands useful work types without introducing networking, rewards, or production infrastructure changes, and exercises the same local transport/validation contracts already in place.

What changed

  • Added text_retrieve support in LocalRunner with strict payload validation, deterministic token extraction, overlap scoring, stable tie-break sorting, and deterministic output shaping.
  • Wired text_retrieve into validation so expected results are recomputed locally and mismatches are rejected (including malformed payloads and incorrect contribution units).
  • Included text_retrieve in default local capabilities so manifest default nodes can advertise and accept the new job type.
  • Added a text_retrieve job to the default local batch example and updated README docs to document required fields, scoring semantics, and failure behavior.
  • Updated manifest/capability/scheduler tests to account for the new workload and keep routing assertions aligned.
  • Added coverage in runner, validation, scheduler, simulation, CLI, node service, and related tests for success paths, malformed payloads, stable ordering, and accounting.

Validation

  • Ran the local unit test suite: PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python3 -m unittest discover -s tests -v (310 tests, all passed).
  • Ran a local flow smoke test: run-local-flow --manifest examples/local-batch.json --output-dir <tmp-output-dir> and confirmed the added workload flowed end-to-end with processed_assignment_count=6, receipt_count=6, and matching ledger total contribution units.
  • Ran audit-local-flow --output-dir <tmp-output-dir> and confirmed flow artifacts validated successfully with ok: true and consistent counts.

Safety notes

  • No force push used.
  • No hard reset used.
  • Local automation paths are not published in this PR body.

@Exohayvan

Copy link
Copy Markdown
Contributor Author

Automated conflicting-PR triage refreshed this branch because the PR change is still relevant. Review log path intentionally redacted.

@Exohayvan
Exohayvan merged commit 0dfb029 into main Jun 30, 2026
22 checks passed
@Exohayvan
Exohayvan deleted the ai/next-step-20260630-041158 branch June 30, 2026 16:35
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.

1 participant