Hiro development journal

Qwen stateful workflow gaps closed

Published Machine-readable JSON

Executive summary

Implemented the approved plan for Hiro's Qwen 3.6 stateful workflow gaps. The work separated harness defects from model behavior, added per-round telemetry, strengthened simulated approval and stale-state semantics, and applied only the bounded model controls supported by evidence.

The final closure evidence is three consecutive canonical runs at six of six workflows, followed by thirty of thirty fresh structurally novel adversarial scenarios. The adversarial batch contained six cases each for concurrent conflicts, scope drift, approval expiry, approval rejection, and injected tool failures, with no unauthorized-write failure.

The full deterministic repository suite passed 185 of 185 tests. Qwen 3.6 remained the active model throughout the closure runs; no production connector, real calendar, email, schedule, or external service was mutated.

Work completed

Evidence-grade model telemetry

Completed
  • Captured model identity, finish reason, prompt tokens, completion tokens, reasoning tokens, visible-content length, message count, prompt character count, parsed tool-call count, and round number for each harness model call.
  • Persisted telemetry with each canonical workflow result so context pressure and empty-response failures can be diagnosed from immutable reports without storing prompt contents.
  • Added deterministic regression coverage for telemetry collection and local API payload controls.

Mailbox and calendar semantics

Completed
  • Made synthetic mailbox search punctuation- and possessive-insensitive and allowed sender local-part matching, fixing the mismatch between a natural query such as a possessive name and the stored address.
  • Required timezone-aware calendar intervals and changed calendar window, conflict, proposal, approval, and outcome comparisons to operate on canonical instants rather than raw timestamp strings.
  • Preserved strict matching for title, attendees, duration, and instant while accepting equivalent representations such as Pacific time and UTC.

Approval and stale-state safety

Completed
  • Approval requests now require an exact nonempty typed scope. Empty, incomplete, or overbroad scopes are rejected without creating a pending approval.
  • A stale calendar result sets an enforced fresh-read precondition. Calendar creation is blocked without mutation until a fresh calendar read succeeds.
  • Queued execution faults are preserved when a freshness guard blocks a call, ensuring the simulated partial-success and idempotent-replay path remains realistic and testable.

Bounded Qwen behavior controls

Completed
  • The harness now sends LM Studio's supported reasoning-effort control and places the model's non-thinking instruction at active prompt boundaries. Telemetry confirmed that closure runs produced visible content on every call.
  • Added general rules to preserve named local wall-clock time with explicit offsets, advance after successful mutations, complete each distinct requested artifact, and immediately refresh after stale calendar data.
  • Context compaction and new proposal or draft inspection tools were deliberately not added: the corrected workflow six passed consistently with a maximum observed prompt of 4,666 tokens, below the configured 8,192-token context.

Decisions and reasoning

Validation and evidence

CheckStatusResult
Focused harness and router regressions passed 24 focused tests passed, including possessive mailbox search, timezone-equivalent approval, strict scope rejection, stale-read enforcement, queued-fault preservation, telemetry, and reasoning-control payload coverage.
Canonical closure run one passed stateful-20260723T052157Z used qwen_qwen3.6-35b-a3b, passed 6/6 workflows, completed in 128.882 seconds, and had zero empty visible-content calls.
Canonical closure run two passed stateful-20260723T052429Z used qwen_qwen3.6-35b-a3b, passed 6/6 workflows, completed in 123.919 seconds, and had zero empty visible-content calls.
Canonical closure run three passed stateful-20260723T052709Z used qwen_qwen3.6-35b-a3b, passed 6/6 workflows, completed in 123.463 seconds, and had zero empty visible-content calls.
Fresh adversarial structural variants passed adversarial-20260723T052957Z passed 30/30 scenarios with 30 novel signatures in 212.497 seconds: six each for concurrent conflict, scope drift, approval expiry, approval rejection, and adversarial failure.
Full deterministic repository suite passed 185 tests passed in 8.72 seconds. A prior wrapper attempt produced three launcher errors because its environment normalization removed Path; rerunning with the prescribed canonical Path normalization passed all tests.

Current state

Next steps