Skip to content

G5: map workflow state to PST1 progress message types (#58) - #64

Draft
aien-spark wants to merge 2 commits into
lane-g/g4-fire-drillsfrom
lane-g/g5-progress-mapping
Draft

aien-spark wants to merge 2 commits into
lane-g/g4-fire-drillsfrom
lane-g/g5-progress-mapping

Conversation

@aien-spark

Copy link
Copy Markdown
Collaborator

Closes #58

Lane G, issue G5: workflow state to the shared Pi/Spark progress messages. Stacked on #63 (G4), base lane-g/g4-fire-drills.

Tested commit: 167c15e (content 19a586f). Gates ran against aien-protocols main 4b76f7f.

What is here

  • src/orchestration/progress.rs: PstType (PST1 Draft v0 section 5, values 1 to 14, side), message_type(&TaskState), message_for_state, messages_from_report, ProgressContext::from_pointers (ids and effect classes from the G3 stored pointers), named refusals.
  • tests/workflow_progress_tests.rs: 8 tests, including the table over every state.
  • docs/WORKFLOW-DAG.md: one section on the mapping.

Decisions (made here, with reasons)

  • Pending and Ready both report queued; a repeat of the same type for one task is not resent, so ordinals only move when the Pi learns something new.
  • Skipped reports failed with reason PREREQUISITE_FAILED: PST1 has no skipped type, and the task will never run.
  • Failed with Uncertain effect certainty reports uncertain_after_disconnect, never failed (PST1 section 8 item 3). The workflow state stays Failed; only the message is truthful about not knowing. The PST1 name says "after disconnect" but its meaning is "not known whether it happened"; flagged for the C owners.
  • The PST1 type numbers are copied here rather than taken from the draft aien-pi-spark-task crate, which is only on the lane C integration branch. Swap to that crate when it merges (item 4).
  • Refuse instead of guess: no cause id (never minted), run id mismatch, task with no recorded effect class, completed without a sha256: result digest, waiting for approval without an action digest. AEGIS records no action digest yet, so a real waiting_for_approval needs the desk (G6 / sovereign-core#379).

Checks

Check Result
DoD 1: pure mapping with cause id, objective id, task ids, ordinal from the records PASS (g5_messages_from_a_real_run_carry_ids_ordinals_and_digests, g5_context_comes_from_the_stored_pointers)
DoD 2: partial results as the snapshot result digest PASS (same test; non-digest result refused in g5_refusals)
DoD 3: resume summary from the G3 rebuild NOT_RUN: outside the frozen first cut; the resume_snapshot payload layout is not defined in PST1 Draft v0
DoD 4a: every state maps to exactly one message type PASS (g5_every_task_state_maps_to_exactly_one_spark_message_type)
DoD 4b: bytes equal the aien-protocols-mv#30 vector NOT_RUN: no encoding in the frozen first cut; needs aien-protocols-mv#31 merged
Red before green PASS: against a stub, 7 of 8 tests failed
Deliberate break (report Failed even when the effect is not known) Red: 2 tests FAILED (the state table and g5_failed_with_unknown_effect_is_reported_as_not_known)
fmt, check, clippy -D warnings, test (188 passed), anti-slop, zero-disk-secrets PASS on host
crumb compile then crumb verify . PASS (OK: 13 crumbs current)
Spark bundle with AEGIS-TEST and AEGIS-CLIPPY PASS NOT_RUN: no Spark commands from this lane

Remaining gap

Resume summary (item 3), encoding and the vector match (item 4), accepted, text_chunk, receipt_reference, and the action digest source.

Next dependency

aien-protocols-mv#31 (C4 encoder) for the bytes; G6 (#59) stacks on this branch.

🤖 Generated with Claude Code

drakestapleton and others added 2 commits October 16, 2026 14:55
Pure mapping, no encoding, no network. Every TaskState maps to one
Spark-side PST1 type; Failed with Uncertain certainty reports not known.
Ids from the stored records, per-task ordinals from 0, result digests
from the snapshot. Refuses instead of guessing: no cause, run mismatch,
unknown task, missing result or action digest, non-sha256 result.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown

⚖️ Sovereign Code Review & Alignment Gate

Greetings @aien-spark. I am AIEN, the automated review gate for the AIENOS project.

Your pull request #64 ("G5: map workflow state to PST1 progress message types (#58)") has undergone automated auditing against the project standards.

✅ Doctrine Diff Audit: PASS

  • Telemetry Check: Clean (zero tracking or surveillance hooks detected).
  • Sovereign Voice & Formatting Check: Clean (zero em/en dashes, zero banned buzzwords).
  • Secrets & Credentials Check: Clean (zero plaintext secrets, hardware vault only).
  • Status: Project standards verified.

🌿 Sovereign Steward: Contributor Alignment Interview

Greetings @aien-spark. I am AIEN, the automated steward for the AIENOS project.

We welcome all contributors who share our commitment to open collaboration, global humanity, and disciplined systems craftsmanship. We build to expand computing capability, advance open-source intelligence, and share technology freely with the world.

Your pull request #64 ("G5: map workflow state to PST1 progress message types (#58)") is ready for stewardship alignment.

Please respond directly to these four alignment inquiries:

  1. Long-Term Mission Alignment:
    This initiative is an enduring engineering commitment to open-source technology for humanity, not a vehicle for short-term hype, social media monetization, or get-rich-quick ventures. How does your contribution support global progress and the resilience of local communities?

  2. Telemetry & Integrity:
    Do you certify that this change introduces zero telemetry, zero surveillance, and zero artificial paywalls?

    "I certify that my contribution is submitted in service of human sovereignty and open collaboration. I affirm that this work maintains zero telemetry, contains no surveillance backdoors, and introduces no artificial barriers, and that I offer it under AGPL-3.0-or-later, the license that governs this project. I build so that intelligence is owned by the person who runs it, not rented."

  3. Downstream Heritage Preservation:
    Do you acknowledge and agree that any downstream branch, fork, or copy of this work remains under AGPL-3.0-or-later and retains the project's license and attribution notices, as the LICENSE file requires?

  4. Craftsmanship & Native Discipline:
    What architectural trade-offs did you make, and how did you verify that this code introduces zero regressions, zero unneeded dependencies, and complies with our pure native compiled standards?


Reply to this comment with your affirmation. Once verified against the project standards, I will grant the sovereign-interview-passed clearance. For direct sovereign coordination: Drake Stapleton ([email protected]) and AIEN ([email protected])

@github-actions github-actions Bot added needs-testimony Awaiting contributor oath testimony sovereign-audit-passed Diff clean: zero telemetry and unslop verified labels Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-testimony Awaiting contributor oath testimony sovereign-audit-passed Diff clean: zero telemetry and unslop verified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants