nx_jobfollow_lib.nx
buildroot/runtime/nx_jobfollow_lib.nx
about
nx_jobfollow_lib.nx -- THE ONE FOLLOWER of the tools edge's JOB-STARTED promotion.
WHY THIS EXISTS. The edge may answer ANY tools/call with `JOB-STARTED id=<n>` instead of the organ's
own receipt; the real receipt lands in `_jobs/job_<n>.out`. A client that does not follow that pointer
reads the JOB id as if it were the ORGAN's id -- both are spelled `id=`, and every current reader
scans for that key UNANCHORED -- and then blames the SERVER for omitting fields the server never sent
on that line.
MEASURED 2026-09-04, not theorised: nx_content_put_client posted a begin, received
`JOB-STARTED id=1788537161`, printed `CP-BEGIN id=1788537161 chunk_raw= nchunks=` and exited 5, while
the artifact held the true receipt `CP-BEGIN id=1788537161795845 ... chunk_raw=48402 nchunks=1`.
The job id is a PREFIX of the transfer id (both are epoch-derived), which is exactly why the wrong
number looked plausible enough to print as a fact.
ANCHOR THE PARSE ON THE REPORT LINE: jf_job_id matches the full literal `JOB-STARTED id=`, never a
bare `id=`, so a receipt that merely CONTAINS an id cannot be mistaken for a job pointer.
ONE IMPLEMENTATION, TWO CALLERS, BY CONSTRUCTION. nx_content_put_client posts three times
(begin/chunk/commit); nx_content_get_client posts twice (begin/chunk). That is five call sites which
must agree on what a receipt IS. A shared post-then-follow makes disagreement impossible instead of
making it something two organs have to remember to do the same way.
THE POLL IS NOT A RETRY, AND THE DISTINCTION IS LOAD-BEARING ON A DEGRADED ARRAY. A retry re-issues
work whose outcome is UNKNOWN; this waits for a result the server has already ACCEPTED and promised to
write. The original request is never re-posted -- which matters because a chunk upload is not
idempotent and the hostops lane has filed that a retry loop against the current array is actively
harmful. If the budget expires the caller is told the work is STILL PENDING, never that it failed:
an unfinished job and a failed job demand opposite actions.
NO SILENT CAP: exhausting the poll budget returns 0 and ANNOUNCES the job id, so the caller can read
the artifact by hand rather than concluding the organ died.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 2 importers
imports: nx_syscalls.nxnx_https_post_lib.nxnx_jobfollow_parse.nx
imported by: nx_content_get_client.nxnx_content_put_client.nx
structs
| none |
consts
| none |
functions
| 36 | func jf_post_follow(store_i: i64, url: *u8, req: *u8, reqlen: i64, |