Skip to content

ui-sdk: attribute intermittent invalid worker mount-record refusals #2701

Closed

Description

@schlessera

Context

Observation. Worker launch intermittently refuses with:

provider folder topology could not be qualified before payload start: invalid worker mount record

Recorded occurrences, all on the same guard:

Source Test Conditions
918b34a3 packages/ui-server/tests/private-index.test.ts, "the private index survives the real index being replaced under a running denied turn" one of four local runs
1610c84de5f1804c2c6411bb030e2ce2f8b4e2d6 packages/ui-server/tests/host-fallback-folder-policy.test.ts, "launch (descendant yes, replaces group/private, owner crash): a folder policy refuses the old host before a governed worker pins the folder" #2708 N=16 wide-change run; serial, N=4 and N=8 passed the same selection
a529ebd288c1b806f347fb4e51638385327fd6a6 packages/ui-sdk/tests/governed-worker.test.ts, "the live launch qualifies mounted folders before preserving their ordinary writes" #2708 prepared N=16 run, Bun 1.4.2, 32 logical CPUs

No retained receipt contains the /proc/<pid>/mountinfo bytes that failed to parse, the worker's process state at that moment, or which call site threw.

Source at inspected main dc5d3c73282c29a3f0098306d398743ee18ec791. mountRecords (packages/ui-sdk/src/server/worker-protection.ts:238-244) reads /proc/<pid>/mountinfo, trims it, splits it on newlines and throws for a line missing an id, parent or mount point. An empty read becomes one empty line and throws. Its two callers are the readiness loop (verifyWorkerFolderMountsSteps, same file:264-286; read at line 280) and the later brain-view check (requireWorkerBrainMount, same file:248-254). The wrapper verifyWorkerFolderMounts now drives the shared steps synchronously (same file:257-261); asynchronous launches drive the same steps without blocking. Both retain the same refusal guard. The qualification catch wraps any failure in "could not be qualified before payload start". This source inspection does not establish which read failed in a historical occurrence.

Hypotheses, none established. (a) An empty or partial read while bubblewrap is still building the namespace. (b) An empty read because the worker exited or became a zombie before the identity check ran. (c) A record the parser does not expect. Inspection shows (a) and (b) are possible; it does not show that any reported failure read an empty or partial record. They imply different corrections: (a) suggests treating the read as not ready within the same bounded wait, while (b) is a correct refusal with a misleading message.

Scope

  1. Add failure-only diagnostics to the refusal path: on invalid worker mount record, retain the raw mountinfo bytes read (bounded and sanitized: mount ids, parents and points only, with brain-relative paths), their length, the call site (readiness loop or brain-view check), the worker's /proc/<pid>/stat state and start time, and the time elapsed since launch.
  2. Collect at least one natural occurrence with those diagnostics under the conditions above (for example the ci: run local import-graph feedback through isolated workers #2708 N=16 selection).
  3. Attribute the occurrence to a hypothesis, or to a new one, and only then select the correction.

Out of scope

Acceptance criteria

  • The diagnostics are test-visible: a unit test with a stubbed empty mountinfo read shows the refusal message carrying the call site, byte length and worker state. They do not change the refusal decision.
  • At least one natural occurrence is recorded here with its diagnostics, source SHA, test name and concurrency, or, after a bounded attempt, a report of the conditions tried and the remaining reproduction gap.
  • The correction follows the attribution. If the read is shown to be empty or partial during namespace setup, a unit test feeds an empty read and then a complete one and qualification succeeds, while a genuinely malformed record still refuses at the deadline. If the worker is shown to have exited, the refusal stays and its message names the exit.
  • The three original tests pass at the concurrency that failed, with no guard, deadline or test weakened.

Verification

bun run test packages/ui-sdk/tests and the three named consumer tests, plus the concurrency run that produced the occurrence. Record Bun version, CPU count and concurrency.

Contract impact

None.

2026-10-24: retitled from a selected cause to the attribution task; separated the observed occurrences (now three, from the 2026-10-23 comments) from the empty-read hypothesis; required failed-read contents, worker state and call site before choosing retry semantics; refreshed citations; added needs: repro.

2026-10-24 triage: refreshed the source map after the shared worker-steps conversion; retained all hypotheses as unproven. Priority p2 records wanted unscheduled attribution work. No malformed mount read was captured in this pass.

Current-source readback: at main c670449d3bf1b0639e50ce554d728961f4313add, mountRecords (packages/ui-sdk/src/server/worker-protection.ts:335-341) still rejects a record without id, parent or mount point. Its callers remain the readiness loop (verifyWorkerFolderMountsSteps, same file:361-390; read at line 377) and final brain-view check (requireWorkerBrainMount, same file:344-351). No failed raw mountinfo or natural writer/process-state attribution was captured by this pass. The maintainer detached this investigation from #1668 and deferred it to 0.45.0; preserve that milestone, standalone parent state and needs: repro.

2026-10-25 triage at main ab746a434c4ada11734ffea4e208d1d6211f1aca: Kept the historical inspected-source paragraph intact and added verified current navigation plus the maintainer’s explicit standalone/deferred disposition. No guard relaxation, cause attribution or new reproduction is claimed.

Later lower-load occurrences (2026-10-25)

The #2917 reporter records two mount-record refusals in the complete bun run test packages/ui-sdk packages/ui-server packages/common run on head dc5b531da (5,230 pass / 2 fail; reported load average about 10 after the host slot limit): provider-allowed-route.test.ts at its concurrent allowed/denied live launch and host-fallback-folder-policy.test.ts in the descendant-yes/replaces-group-private/owner-crash case. Across three later two-file probes, one further refusal occurred in descendant-no/replaces-group-private/owner-detached and two probes passed 9/9. These are the reporter’s additional natural occurrences, not fresh triage executions. They extend affected consumers and show recurrence under the reported lower load; they still retain no failed mountinfo bytes/call-site/process-state tuple and do not identify setup, exit or parser behavior as the cause. Preserve needs: repro and all refusal/identity/deadline guards.

2026-10-25 triage at main c670449d3bf1b0639e50ce554d728961f4313add: Folded the later lower-load natural occurrences into the active brief and refreshed the current mount parser/caller map. The causal read contents and worker state remain missing; no retry behavior or guard relaxation is selected.

Later native Claude schedule-admission occurrence — 2026-10-26

Reporter evidence from the retained recurrence:

Additional natural occurrence of this guard/signature during #2984 verification at 588ed2e5cc989d5a439ce8a4b5b98420bfddb7fc:

  • Command: bun scripts/prove-native-host.ts --backend=claude, under the exclusive native fixture lock. Bun 1.4.2; 32 logical CPUs; the two host heavy slots were occupied while the independently locked native proof ran.
  • UID 1000 passed 2/2 cases. UID 0's hosted Claude admission case passed; schedule Git publication inherits active native peer folder admission failed with provider folder topology could not be qualified before payload start: invalid worker mount record at the verifyWorkerFolderMountsSteps catch, called by proveScheduleFolderAdmission at its live peer launch.
  • The native fixture reported complete owned-resource cleanup for both UIDs. This was not the host loop-device prerequisite refusal.
  • Control: exact main 07fbce896099b87903bb994e3b6a939f232669fd, complete Claude UID 0 cell, passed 2/2. Then one complete replay of the same UID 0 cell at the final head passed 2/2. Both used the same frozen installation and native lock. All results and artifacts, including the initial failure, are retained.

The helper and mount-record guard have no diff from that main. The failing peer input supplies only PATH, with no HOME; #2984's new empty-HOME mount condition is inactive for this launch. No failed mountinfo bytes, worker-state tuple or precise read-call-site evidence was captured, so this observation does not establish setup, exit or parser behavior as its cause. No guard, deadline, test or refusal was changed. The existing 0.45.0 attribution work and reproduction gap remain.

2026-10-26 triage at main 2f10e0407769b685083c17a1c90bb43a060b94a0: Folded the additional source-qualified observation into the active brief. The failed identities remain uncaptured, so needs: repro and the existing guards remain.

Main-CI native schedule-admission recurrence — 2026-10-31

Main run 41210714452, runtime_host job 124565097971, checkout b90d60d453ebf7dda2dee22d9d3f4828a4975b53 (tree 64f238dcbec65b641f4f6133bbb2b1a87c475aca), failed the same schedule Git publication inherits active native peer folder admission case in Claude UID 0. Hosted admission passed first; the UID 1000 Claude and pi cells passed. The first two peer launches (schedule-root, schedule-ancestor) have passing receipts; the third (schedule-index) has no receipt and its launch refused with invalid worker mount record.

The failing launch path is unchanged from the earlier recorded 588ed2e5 occurrence. PR #3222 changes the conversation queue gate, its test and a changeset, with no change on this path. Its candidate run 41209034474 passed on the same tree, and the parent main run also passed. This establishes another intermittent occurrence, not its cause.

The failed read's bytes, process state and exact mountRecords call site are still absent. Empty namespace-setup reads and exited-worker reads remain hypotheses; no malformed record is accepted and no retry, deadline or identity guard is changed. The main run remains failed and has not been retried. Preserve the maintainer's standalone 0.45.0 disposition and needs: repro; the diagnostic scope above remains the next work for this issue.

Activity

  1. added
    type: fix
    area: ui-sdk
    on Oct 23, 2026
  2. schlessera commented on Oct 23, 2026

    @schlessera
    OwnerAuthor

    An additional receipt from #2708 at source 1610c84de5f1804c2c6411bb030e2ce2f8b4e2d6 (main includes #2728): the N=16 wide-change run failed packages/ui-server/tests/host-fallback-folder-policy.test.ts, test “launch (descendant yes, replaces group/private, owner crash): a folder policy refuses the old host before a governed worker pins the folder”.

    The exact error is provider folder topology could not be qualified before payload start: invalid worker mount record, from verifyWorkerFolderMounts at packages/ui-sdk/src/server/worker-protection.ts:266, then launchAgentWorker at packages/ui-sdk/src/server/worker-launcher.ts:1275, then the test at line 55. This is the same guard/signature described here, in another consumer test. The queue retained all partial reports and diagnostics and exited nonzero; one sibling was cancelled by normal fail-fast cleanup.

    Wall was 1310.67 seconds; private worker builds took up to 217.76 seconds, minimum whole-host available memory was 21.43 GiB, and mean whole-host CPU utilization was 30.69%. Per the coordinator ruling this known failure is recorded separately from worker-count qualification. No guard, deadline or test is weakened or skipped. The complete serial/N=4/N=8 controls passed the same 464-file selection.

  3. schlessera commented on Oct 23, 2026

    @schlessera
    OwnerAuthor

    Additional #2701 receipt from the #2708 concurrency sweep: prepared N=16 hit packages/ui-sdk/tests/governed-worker.test.ts, “the live launch qualifies mounted folders before preserving their ordinary writes”, with the same invalid worker mount record guard failure. Source a529ebd288c1b806f347fb4e51638385327fd6a6, Bun 1.4.2, 32 logical CPUs, 47.04 GiB RAM. The queue stopped after 540.98s; sibling shards were cancelled and cleanup passed. This attempt also had an independent CONNECT accounting timing failure, filed as #2737. Per coordinator ruling, the mount-record failure is recorded separately and is not counted against the worker count. Full sanitized resource and per-worker receipts are retained in PR #2724.

  4. schlessera commented on Oct 23, 2026

    @schlessera
    OwnerAuthor

    2026-10-24 restructuring: attached to #1668. The refusals occur in provider-folder qualification, including the private-index and retained-folder tests that the epic's boundary depends on.

  5. added
    needs: repro
    on Oct 24, 2026
  6. changed the title [-]ui-sdk: a partial mountinfo read fails provider folder qualification as an invalid record[/-] [+]ui-sdk: attribute intermittent invalid worker mount-record refusals[/+] on Oct 24, 2026
  7. schlessera commented on Oct 24, 2026

    @schlessera
    OwnerAuthor

    Previous body, preserved verbatim before the 2026-10-24 rewrite (which separates the observed failures from the empty-read hypothesis):

    Body as filed

    Context

    verifyWorkerFolderMounts reads /proc/<pid>/mountinfo while bubblewrap may still be building the namespace, and throws on any line without a fifth field (packages/ui-sdk/src/server/worker-protection.ts:218-221). Observed once in four local runs of packages/ui-server/tests/private-index.test.ts on main's code (918b34a3), in "the private index survives the real index being replaced under a running denied turn":

    error: provider folder topology could not be qualified before payload start: invalid worker mount record
          at verifyWorkerFolderMounts (packages/ui-sdk/src/server/worker-protection.ts:252:15)
          at launchAgentWorker (packages/ui-sdk/src/server/worker-launcher.ts:1262:7)
    

    The surrounding loop already tolerates "mount points not yet present" by waiting until the deadline. An empty or partial mountinfo read (an empty string after trim() splits to one empty line) is treated as malformed instead of as "not ready".

    Scope

    Treat an empty or partially read mountinfo as not yet ready within the same bounded wait; keep refusing a genuinely malformed record after the deadline.

    Out of scope

    • Changing which mounts are qualified.

    Acceptance criteria

    • A unit test feeds an empty mountinfo read followed by a complete one and the qualification succeeds; a malformed record still refuses at the deadline.
    • Needs scoping: confirm the empty-read cause with a repro before relying on it.

    Verification

    bun run test packages/ui-sdk/tests and the private-index suite repeated.

    Contract impact

    None.

  8. added
    priority: p2
    on Oct 24, 2026
  9. schlessera commented on Oct 24, 2026

    @schlessera
    OwnerAuthor

    2026-10-24 triage: updated the moved mountRecords/qualification anchors after the worker-steps conversion and assigned priority: p2 for unscheduled attribution work. The empty/partial read remains a hypothesis; needs: repro and all guard/deadline/identity requirements remain. No new natural occurrence is claimed.

  10. added this to the 0.45.0 milestone on Oct 25, 2026
  11. schlessera commented on Oct 25, 2026

    @schlessera
    OwnerAuthor

    2026-10-25 triage at main ab746a434c4ada11734ffea4e208d1d6211f1aca: Kept the historical inspected-source paragraph intact and added verified current navigation plus the maintainer’s explicit standalone/deferred disposition. No guard relaxation, cause attribution or new reproduction is claimed.

  12. schlessera commented on Oct 25, 2026

    @schlessera
    OwnerAuthor

    2026-10-25 occurrences on #2917's head dc5b531da (local, load average ~10 after the host slot limit): in one full bun run test packages/ui-sdk packages/ui-server packages/common run (5230 pass, 2 fail), both failures were this refusal, in provider-allowed-route.test.ts (#2725's concurrent allowed/denied cache test, at its live launchAgentWorker) and host-fallback-folder-policy.test.ts ("launch (descendant yes, replaces group/private, owner crash)"). In three reruns of those two files, it occurred once more (host-fallback-folder-policy.test.ts, "descendant no, replaces group/private, owner detached"); the other two reruns passed 9/9.

  13. schlessera commented on Oct 25, 2026

    @schlessera
    OwnerAuthor

    2026-10-25 triage at main c670449d3bf1b0639e50ce554d728961f4313add: Folded the later lower-load natural occurrences into the active brief and refreshed the current mount parser/caller map. The causal read contents and worker state remain missing; no retry behavior or guard relaxation is selected.

  14. schlessera commented on Oct 26, 2026

    @schlessera
    OwnerAuthor

    Additional natural occurrence of this guard/signature during #2984 verification at 588ed2e5cc989d5a439ce8a4b5b98420bfddb7fc:

    • Command: bun scripts/prove-native-host.ts --backend=claude, under the exclusive native fixture lock. Bun 1.4.2; 32 logical CPUs; the two host heavy slots were occupied while the independently locked native proof ran.
    • UID 1000 passed 2/2 cases. UID 0's hosted Claude admission case passed; schedule Git publication inherits active native peer folder admission failed with provider folder topology could not be qualified before payload start: invalid worker mount record at the verifyWorkerFolderMountsSteps catch, called by proveScheduleFolderAdmission at its live peer launch.
    • The native fixture reported complete owned-resource cleanup for both UIDs. This was not the host loop-device prerequisite refusal.
    • Control: exact main 07fbce896099b87903bb994e3b6a939f232669fd, complete Claude UID 0 cell, passed 2/2. Then one complete replay of the same UID 0 cell at the final head passed 2/2. Both used the same frozen installation and native lock. All results and artifacts, including the initial failure, are retained.

    The helper and mount-record guard have no diff from that main. The failing peer input supplies only PATH, with no HOME; #2984's new empty-HOME mount condition is inactive for this launch. No failed mountinfo bytes, worker-state tuple or precise read-call-site evidence was captured, so this observation does not establish setup, exit or parser behavior as its cause. No guard, deadline, test or refusal was changed. The existing 0.45.0 attribution work and reproduction gap remain.

  15. schlessera commented on Oct 31, 2026

    @schlessera
    OwnerAuthor

    Main-CI native schedule-admission recurrence — 2026-10-31

    Main run 41210714452, runtime_host job 124565097971, checkout b90d60d453ebf7dda2dee22d9d3f4828a4975b53 (tree 64f238dcbec65b641f4f6133bbb2b1a87c475aca), failed the same schedule Git publication inherits active native peer folder admission case in Claude UID 0. Hosted admission passed first; the UID 1000 Claude and pi cells passed. The first two peer launches (schedule-root, schedule-ancestor) have passing receipts; the third (schedule-index) has no receipt and its launch refused with invalid worker mount record.

    The failing launch path is unchanged from the earlier recorded 588ed2e5 occurrence. PR #3222 changes the conversation queue gate, its test and a changeset, with no change on this path. Its candidate run 41209034474 passed on the same tree, and the parent main run also passed. This establishes another intermittent occurrence, not its cause.

    The failed read's bytes, process state and exact mountRecords call site are still absent. Empty namespace-setup reads and exited-worker reads remain hypotheses; no malformed record is accepted and no retry, deadline or identity guard is changed. The main run remains failed and has not been retried. Preserve the maintainer's standalone 0.45.0 disposition and needs: repro; the diagnostic scope above remains the next work for this issue.

  16. schlessera commented on Nov 4, 2026

    @schlessera
    OwnerAuthor

    Bounded reproduction investigation — 2026-11-04

    Verdict: inconclusive; retain needs: repro and keep agent-ready absent. No new natural invalid worker mount record refusal occurred. The successful controls below do not disprove the intermittent defect or establish any of its proposed causes.

    Inspected source and environment

    Repeatable commands and observed results

    From that checkout, after installing dependencies, use resolved executables so a cleared HOME does not break tool-manager shims:

    repro_bun=$(bun -p 'process.execPath')
    repro_node=$(node -p 'process.execPath')
    repro_path="$(dirname "$repro_bun"):$(dirname "$repro_node"):/usr/local/bin:/usr/bin:/bin"
    repro_run() {
      env -i PATH="$repro_path" HOME=/tmp BUN_OPTIONS=--no-env-file \
        "$repro_bun" run test "$@"
    }
    
    # Baseline: exit 0, 1 pass, 0 fail, 3 assertions.
    repro_run packages/ui-sdk/tests/governed-worker.test.ts \
      -t 'the live launch qualifies mounted folders before preserving their ordinary writes'
    
    # Save the observation-only preload below at /tmp/odysseus-mount-read-probe.ts.
    # Exit 0, 40 pass, 0 fail; 160 observed numeric-PID mountinfo reads, 0 invalid.
    repro_run packages/ui-sdk/tests/governed-worker.test.ts \
      -t 'the live launch qualifies mounted folders before preserving their ordinary writes' \
      --rerun-each=40 --preload /tmp/odysseus-mount-read-probe.ts
    
    # All four existing cases, repeated ten times; exit 0, 40 pass, 0 fail.
    # 200 observed numeric-PID mountinfo reads, 0 invalid.
    repro_run packages/ui-server/tests/host-fallback-folder-policy.test.ts \
      --rerun-each=10 --preload /tmp/odysseus-mount-read-probe.ts
    
    # Each stops before the target mount qualification (details below).
    repro_run packages/ui-server/tests/private-index.test.ts \
      -t 'the private index survives the real index'
    repro_run packages/ui-server/tests/private-index.test.ts \
      packages/ui-server/tests/provider-allowed-route.test.ts \
      -t 'the private index survives the real index|a denied turn beside an allowed one'

    Expected: governed launch qualifies the retained root and ancestor before starting the payload; ordinary writes succeed while root/ancestor replacement is refused. In the private-index/cache cases, launch should qualify before the ready marker and the original isolation assertions.

    Observed runtime evidence:

    • Governed repeats passed 120 original assertions: child exit 0, group/private/inside.md exactly Athena, and sibling.md exactly Odysseus (packages/ui-sdk/tests/governed-worker.test.ts:280-290). No guards or payload commands were changed.
    • Host-fallback repeats passed 240 original assertions. Each receipt had oldHostStarted: false, refused.name: HostFallbackRefusedError, worker exit 0, output ROOT_RETAINED, and identical rootBefore/rootAfter inode values. This includes both historically affected launch variants (descendant yes/owner crash and descendant no/owner detached).
    • The observation preload saw 360 real numeric-PID /proc/.../mountinfo reads, zero invalid records, over these 80 passing cases. It returns every original read result unchanged; it does not feed an empty read, kill a worker, alter mounts, or retry anything. Totals are summed from 40 governed summaries (reads: 4, invalid: 0 each) and 10 host summaries (reads: 20, invalid: 0 each). Its hook-reached assertion passed.
    • An initial combined four-file selection ran 7 cases: 5 pass / 2 fail. The private-index and concurrent allowed/denied cache cases failed with the following different refusal, also seen with private-index alone and in the final two-file probe:
    error: Immutable worker inputs require an asynchronously prepared native managed-storage checkpoint; full-copy startup fallback is unavailable. Prepare and pass startupView before spawning.
      at createWorkerStartupView (packages/ui-sdk/src/server/worker-startup-view.ts:85:13)
      at launchAgentWorkerSteps (packages/ui-sdk/src/server/worker-launcher.ts:1401:73)
      at ... (packages/ui-server/tests/private-index.test.ts:109:20)
    # The cache case calls launchAgentWorker at provider-allowed-route.test.ts:213:20.
    

    This is an earlier startup refusal, not #2701 reproduced. An observation-only wrapper around resolveWorkerProtection emitted no fallback-reason receipt; it supplied no cause attribution and was removed from the investigation path. No product fix was attempted.

    Isolation limits and historical evidence

    The passing commands used the repository's normal offline preload, a cleared environment with no provider credentials, and existing Odysseus shell/CLI fixtures. They made no live model/provider calls. The preload is not a general OS sandbox for shell executables; no claim of that stronger isolation is made.

    The documented unshare --user --map-current-user --net ... path was refused at /proc/self/uid_map with Operation not permitted. A bubblewrap outer network namespace did show only loopback, empty main routes and all five capability sets zero, but running the target test inside it stopped at Bun.spawnSync('/usr/bin/mkfifo', ...) with EACCES, before mount qualification. An initial cleared-HOME attempt through the Bun tool-manager shim also refused before tests; the resolved-executable commands above avoid that. None of these launch/harness failures counts as the reported defect, and no host security setting or test guard was changed.

    I downloaded and inspected the linked 2026-10-31 runtime_host job log: it retains the exact mount-record signature at the qualification catch and proveScheduleFolderAdmission, with hosted Claude UID 0 admission passing before the schedule case failed. It still does not identify the failing mountRecords call or capture the failed read/state tuple. That is historical recurrence evidence, not a new local reproduction.

    Remaining gap / next step: capture one natural occurrence with the issue's bounded, sanitized failed-read bytes and length, exact readiness-versus-brain-view call site, process state/start identity and launch-relative time. That requires the specified failure-only diagnostics and a supported runtime fixture, then a bounded replay of the historically failing selection or native schedule case. The full N=16 import-graph sweep and the UID 0 native/Btrfs matrix were not replayed here. A live provider is not inherently needed for mount attribution; these are kernel/worker observations and the existing native proof uses local fixtures. No cause, correction or retry semantics is selected from these negative controls.

    Labels remain type: fix, area: ui-sdk, priority: p2, needs: repro; milestone 0.45.0 is preserved. No assignment, parent, issue-body or product-source change; no commit, push, PR or closure. The checkout remains clean.

    Reusable observation-only preload used in the bounded repeats
    import { afterAll, expect, spyOn } from "bun:test";
    import * as fs from "node:fs";
    
    const originalRead = fs.readFileSync;
    let reads = 0;
    let invalid = 0;
    const started = performance.now();
    const hook = spyOn(fs, "readFileSync").mockImplementation(((...args: any[]) => {
      const result = (originalRead as any)(...args);
      const path = String(args[0]);
      const pid = /^\/proc\/(\d+)\/mountinfo$/.exec(path)?.[1];
      if (pid) {
        reads++;
        const text = typeof result === "string" ? result : result.toString("utf8");
        const bad = text.trim().split("\n").some((line: string) => {
          const [id, parent, , , point] = line.split(" ");
          return !id || !parent || !point;
        });
        if (bad) {
          invalid++;
          let identity: unknown;
          try {
            const stat = originalRead(`/proc/${pid}/stat`, "utf8").replace(/^.*\) /s, "").split(" ");
            identity = { state: stat[0], startTime: stat[19] };
          } catch (error) { identity = { error: (error as any).code }; }
          console.error("ODYSSEUS_MOUNT_READ", JSON.stringify({
            bytes: Buffer.byteLength(text), empty: text.length === 0, identity,
            elapsedProbeMs: performance.now() - started,
            // Keep only the parser's three fields, never mount sources/options.
            fields: text.trim().split("\n").slice(0, 8).map((line: string) => {
              const [id, parent, , , point] = line.split(" ");
              return { id, parent, point: point?.replace(/\/tmp\/[^/\s]+/g, "<fixture>") };
            }),
            stack: new Error("mount read observation").stack,
          }));
        }
      }
      return result;
    }) as typeof fs.readFileSync);
    
    afterAll(() => {
      hook.mockRestore();
      console.log("ODYSSEUS_MOUNT_READ_SUMMARY", JSON.stringify({ reads, invalid }));
      expect(reads, "OBSERVATION_HOOK_REACHED_REAL_MOUNTINFO_READS").toBeGreaterThan(0);
    });

    The stack/state emission runs only after an invalid real read. elapsedProbeMs is explicitly time since preload initialization, not a substitute for the required launch-relative diagnostic. No invalid read occurred, so no failure tuple was collected.

  17. schlessera commented on Nov 4, 2026

    @schlessera
    OwnerAuthor

    New occurrence on main, 2026-11-04. It turned main red (incident #3559). Run 41798558707 at 02859047c, unit, packages/ui-server/tests/governance-policy.test.ts:420 ("a live peer retaining a descendant permits shared admission of its pinned ancestor"): provider folder topology could not be qualified before payload start: invalid worker mount record. Raising to p0: it blocks every merge until a declared fix lands.

  18. added
    priority: p0
    agent-ready
    and removed
    priority: p2
    needs: repro
    on Nov 4, 2026
  19. self-assigned this
    on Nov 4, 2026
  20. schlessera commented on Nov 4, 2026

    @schlessera
    OwnerAuthor

    Claiming for the #3559 red-main fix (claim token c2701-7131). Branch fix/2701-worker-mountinfo-read.

    Plan: attribute the failing read at the parser (bytes length, call site, /proc/<pid>/stat state and start time, elapsed since launch) and separate "read not yet complete / process not ready" from "malformed table", which still refuses. No guard, deadline or identity check is loosened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyarea: ui-sdkpriority: p0type: fix

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions