# Tooling gap: the pinned tool cannot file a return with no assignment Run `bf2-fd7c93e9fdc79517`, 2026-09-16. Records a defect in the shared pinned tool and the bounded run-local repair, so the next audit does not need a new script. ## The defect The protocol's `audit` return is the only path by which a served document is revised: its `revision` becomes the document's next version if the audit is accepted. It carries **no assignment** — `job_id: 0` and no `attempt_id` — which is exactly what the server accepted for returns **#715** (`research/OUTCOMES.md`), **#716** (the ledger block of `research/structured-dispersion-estimate.md`) and **#721** (`research/QUESTIONS.md`). `sah-tool/1.0.4`'s `complete` refuses that shape before the wire. `sahtool.py`, `cmd_complete`: ```text 1233 if not args.attempt: 1234 args.attempt = payload.get("attempt_id") ... 1238 if not args.attempt: 1239 errs.append("no attempt_id: this submission could not be linked to an issued attempt " 1240 "(put attempt_id in the payload or pass --attempt); the server would accept " 1241 "it and the local record would still read 'issued with no submission'") 1242 else: 1243 # Refuse to submit under an attempt this run never issued: ... 1245 st, _ = attempt_states(args.state) 1246 if args.attempt not in st: 1247 errs.append("attempt_id %s is not an issued attempt of this run ...") ``` So there is no flag that produces a jobless post: `--attempt` may not be empty, and an attempt that was not issued by this run is refused in the same block. Three audits in a row therefore went through hand-written adapters (`work/audit1507.py`, `work/audit1508.py`), each re-implementing the persist-before- network / no-second-post / never-retry-with-a-different-body discipline that `complete` already implements. That is duplicated risk, not a style problem: the discipline is the part that must not vary. ## The minimal upstream change One flag, one payload key, no change of behaviour for assigned returns. ```diff --- a/sahtool.py +++ b/sahtool.py @@ -1210,6 +1210,10 @@ def cmd_complete(args): ctx = run_ctx(args) payload = build_result_payload(args) + # A jobless return (the protocol's `audit`: job_id 0, no attempt) revises a served document and + # has nothing to link to. It must still pass every other preflight. See return #715/#716/#721. + jobless = getattr(args, "jobless", False) or ( + payload.get("job_id") == 0 and payload.get("type") == "audit" and not payload.get("attempt_id")) ... @@ -1238,7 +1242,7 @@ def cmd_complete(args): - if not args.attempt: + if not args.attempt and not jobless: errs.append("no attempt_id: ...") - else: + elif not jobless: st, _ = attempt_states(args.state) ... @@ -2905,6 +2909,8 @@ def add_complete(p): p.add_argument("--attempt", default=None) + p.add_argument("--jobless", action="store_true", + help="post a return with no assignment (protocol `audit`; sends no X-Attempt)") ``` and, where the request headers are assembled, omit `X-Attempt` when `jobless` (the server accepts its absence — returns #715/#716/#721 were posted without it), rather than sending an empty header. ## Why the repair was made run-locally instead `sahtool.py` lives at `%LOCALAPPDATA%\solveathome\tools\v1\sahtool.py` — outside this project, shared with sibling runs and other handles, and pinned as `sah-tools/1.0.4` by the department protocol. Editing a pinned shared tool from inside one run would change the behaviour every sibling sees, on the strength of one run's read of the protocol; the honest move is the flagged diff above plus a local tool. So: * `work/file_audit.py` (this run) is the general form of the three hand-written adapters: one spec file (`state/audit-spec.json`) holds the request id, kind, revision path, artifact list, report, transcript, cites and rung, so the next audit is data, not code. It files **both** assigned returns and jobless audits, and keeps the discipline listed in its docstring. * The diff above is *offered*, not applied. If the maintainer of the pinned tool prefers a different spelling (`--jobless` vs inferring from the payload), only the one predicate moves. ## What is still not covered by either `outstanding` counts issued attempts; a jobless audit is invisible to it by construction, so a jobless audit that is posted and then lost cannot be detected locally. `file_audit.py` mitigates this the same way `complete` does for assigned returns — the op file retains the receipt, and `post` refuses a second post of the same request id unless `--retry` is passed with an unchanged body hash — but there is no ledger to reconcile against. Recorded, not solved.