RESULT: idle pickup reasons and expired execution capacity¶
Task: 0a692b96-4bf3-48f8-ade2-ce0a74092a73, frozen version 16.
Execution: 7b203c68-7402-4709-a4d9-588407ce2791.
Repository: h8v6/heyaira; branch: heyaira/0a692b96.
Source and starting carried candidate: fd77b53da420530d33c01c8162ab9579cd034abe.
Round-1 parent baseline: 0bcb6a66ffa5a9857cf0d2ffc124573183a53622.
Implementation: d745e7d33900978b627cff28908f59e59bde1650, parent fd77b53.
The subsequent evidence-only commits culminate in the result SHA recorded in the HeyAira
RESULT receipt. Existing commits were preserved. Subagents: none.
Worker evidence is not independent acceptance; Bridge owns verification and publication.
Cause, changes and confidence¶
An idle stopped heartbeat with an empty reason replaced a known skipped-offer
reason with unreported. The probe now prefers pickup.reason for stopped
only when it is a string non-empty after trimming. paused and exhausted
retain their pickup-reason precedence and safe fallback. Other states retain
the existing skipped-offer logic. The safe filter itself is unchanged.
Expired running execution rows also hid stalled offers by occupying capacity.
The running count now uses the frozen contract's exact expiry predicate:
NOT (e.lease_expires_at <= clock_timestamp() OR e.deadline_at <= clock_timestamp()).
T2 and the full-capacity stop-signal fixtures now supply live leases and
deadlines. V4 uses a separate synthetic task to respect the active-task index.
No migrations, Bridge changes, new alert types, threshold or alert-shape changes.
Intended files: src/heyaira/server_beat.py, tests/test_bridge_pickup.py,
docs/operations/bridge-request-failures.md, and this evidence file.
The round-1 evidence remains intact as historical evidence for frozen version 2.
Confidence is high: both defects were reproduced on unchanged base code and
all focused checks passed against disposable real PostgreSQL databases.
Setup and execution limitations¶
The assigned worktree started clean at fd77b53; origin was
[email protected]:h8v6/heyaira.git, branch heyaira/0a692b96.
server_identity matched the supplied resource, instance and project;
task_get(task_id, version=16) supplied K1–K4 before changes.
The existing Python 3.12.7 environment and prepared local PostgreSQL connection
were used without installation. The provided TMPDIR is the writable
heyaira-tmp directory belonging to this Git worktree. DSNs are not printed.
The macOS /usr/bin/git shim emitted denied Xcode cache-write warnings. Git
checks and commits therefore used /Library/Developer/CommandLineTools/usr/bin/git.
Git warned about the unreadable global ignore file. Commit creation emitted
a denied packed-refs.lock write, but succeeded, and the new SHA and parent
were read back. These are sandbox limitations, not candidate defects.
All commands below ran from the assigned worktree unless the base archive is
explicitly named. The K2 run began with the final implementation in the working
tree, which was committed unchanged as d745e7d3 during that run. The committed
HEAD K1 run and K3/K4 checks ran at d745e7d3. Later commits add only evidence.
K1 — pass¶
Frozen method: python scripts/test_postgres.py tests/test_bridge_pickup.py -p no:cacheprovider
on an isolated fd77b53 archive with the new tests and on HEAD.
Preparation: git archive fd77b53da420530d33c01c8162ab9579cd034abe | tar -x -C .work-evidence/base
(exit 0), then copy only the final tests/test_bridge_pickup.py into that archive.
No base implementation files were changed. The archive is temporary validation
material, not part of the committed patch.
An initial base run exited 1 with 8 failed, 39 passed in 2.79s. Its three V4
cases failed during setup with UniqueViolationError: bridge_executions_task_active;
those setup failures were not counted as reproducing V4. After giving the
running execution a separate synthetic task, the final base run of the frozen
command from .work-evidence/base exited 1 with actual behavioral assertions:
FAILED tests/test_bridge_pickup.py::test_v1_stopped_without_nonempty_string_keeps_skip_reason[empty]
FAILED tests/test_bridge_pickup.py::test_v1_stopped_without_nonempty_string_keeps_skip_reason[whitespace]
FAILED tests/test_bridge_pickup.py::test_v1_stopped_without_nonempty_string_keeps_skip_reason[number]
FAILED tests/test_bridge_pickup.py::test_v1_stopped_without_nonempty_string_keeps_skip_reason[object]
FAILED tests/test_bridge_pickup.py::test_v4_expired_running_execution_does_not_fill_capacity[V4-expired-lease]
FAILED tests/test_bridge_pickup.py::test_v4_expired_running_execution_does_not_fill_capacity[expired-deadline]
FAILED tests/test_bridge_pickup.py::test_v4_expired_running_execution_does_not_fill_capacity[both-expired]
FAILED tests/test_bridge_pickup.py::test_pickup_reason_fallback_does_not_use_skip_reason[None-stopped]
8 failed, 39 passed in 2.65s
V1's empty case failed with assert 'unreported' == 'repository_not_allowed'.
V4's expired-lease case failed with assert 'OK' == 'FAIL'.
The other V1/V4 cases reproduced the same respective behavioral assertions.
V2's None-stopped case also reproduced the lost skipped-offer reason.
Fixed working-tree run: exit 0, 47 passed in 2.27s, zero skipped tests.
Repeated at committed HEAD d745e7d3 using the same frozen command: exit 0:
............................................... [100%]
47 passed in 2.36s
postgres_acceptance=passed: selected tests, zero skipped tests
| Required regression | fd77b53 with final tests | Committed implementation HEAD |
|---|---|---|
| V1 empty stopped reason + skipped old offer + free slot | Failed: unreported instead of repository_not_allowed | Passed |
| V2 None-stopped fallback; paused/exhausted None remain unreported | None-stopped failed; paused/exhausted passed | All passed |
V3 explicit background disabled (test_t4_stopped_pickup_reason_overrides_skip_reason) |
Passed | Passed |
| V4 expired lease + old offer + capacity 1 | Failed: OK instead of FAIL | Passed |
| T1 exhausted without offers | Passed | Passed |
| T2 full slot / T3 free slot | Both passed | Both passed |
| T4 explicit stopped reason | Passed | Passed |
| T5 old / recent RFC 3339 paused timestamp | Both passed | Both passed |
Supplementary cases: whitespace and non-string stopped reasons, deadline-only expiry and both expired; all fail behaviorally on base and pass on HEAD. Existing safe-reason, capacity-independent stop-signal, incident/recovery, timestamp, registration and optional malformed-health tests pass.
K2 — pass¶
Frozen command:
python scripts/test_postgres.py tests/test_bridge_pickup.py tests/test_bridge_failure_background.py tests/test_notification_docs_contract.py tests/test_docs_contract.py -p no:cacheprovider
Exit 0; actual output:
........................................................................ [ 97%]
.. [100%]
74 passed in 19.15s
postgres_acceptance=passed: selected tests, zero skipped tests
Zero failures, zero errors, zero skips. No sandbox listening-socket skips to list. The full suite was not run: frozen v16 assigns its judgment to CI, not this worker.
K3 — pass¶
At committed implementation HEAD, each command exited 0:
PYTHONPATH=src python scripts/check_docs_contract.py
documentation contract passed: 48 MCP tools covered
PYTHONPATH=src python scripts/export_mcp_contract.py --check
MCP contract is up to date
git diff --check
(no output)
The evidence patch was also checked for whitespace before its commit.
K4 — pass¶
git diff --name-only 0bcb6a6..HEAD at implementation HEAD exited 0:
docs/SERVER_BEAT_LIMITS.md
docs/operations/bridge-request-failures.md
docs/reports/0a692b96-pickup-evidence.md
src/heyaira/server_beat.py
tests/test_bridge_pickup.py
The evidence-only result commit additionally includes
docs/reports/0a692b96-pickup-round2-evidence.md; all paths remain under
src/, tests/, or docs/.
git merge-base --is-ancestor fd77b53da420530d33c01c8162ab9579cd034abe HEAD
exited 0 with no output. All new commits are appended to the carried candidate.
RESULT submission validation¶
The first task_result attempt was rejected with invalid_idempotency_key.
Its key contained colons; the server accepts only [A-Za-z0-9_.-]{1,128}.
Validation precedes durable writes, so no RESULT was appended by that attempt.
The corrected execution-specific key is
7b203c68-7402-4709-a4d9-588407ce2791-pickup-round2-result.
The final submission outcome is recorded by the tool response and read-back.
Handoff¶
Blockers: none. Follow-ups: none within this closed scope. No push, pull request, merge, install, deploy or production mutation was performed. Next step: Bridge independently verifies K1–K4 on the result commit, then owns publication. Full-suite CI and independent verification have not been run here.