Repository navigation
Description
Problem
Follow-up implementation design from #100 and its merged research in #115. Supported Linux synthetic measurements show that lsof can exit zero with no warning while a hidden process holds a flock and the only visible process merely has the file open. Existing explicit-warning refusal does not distinguish this case. A wrong-target signal against a real Codex process has not been reproduced.
Proposed scope
Require positive, descriptor-level FLOCK evidence for an eligible Linux candidate, correlated to the same device/inode and revalidated process instance. /proc/locks acquisition PID alone is insufficient: an inherited open-file description can outlive the original acquisition process. This is a Linux adapter proposal, not permission to disable or weaken macOS handling implicitly.
Acceptance criteria
- Finalize a reviewed contract against the pinned Codex acquisition/failure/drop source and the measured cases in
docs/research-lock-attribution.mdbefore changing runtime eligibility. - Bound descriptor enumeration and read size/time. Read and validate candidate FD identity, fdinfo lock evidence, PID/start-time/UID, and target file identity; detect replacement between observations.
- Count only a held matching exclusive FLOCK record, not a blocked waiter or unrelated byte-range record. Do not require the saved acquisition PID to equal a surviving inherited holder's PID.
- Missing, denied, malformed, ambiguous, conflicting, or changing evidence fails closed before any signal. Absence in global
/proc/locksnever means free. - Revalidate attribution at the final signal boundary without inserting an await/spawn or carrying the native coordination guard across a signal. Document remaining races and visibility assumptions.
- Use real-lock synthetic tests for hidden holder/visible nonholder, inherited copies, permission/namespace limits, FD replacement and malformed/truncated records; refusals send zero SIGTERM. Preserve normal owner controls and the independent guarded probe.
- A positive inherited FD demonstrates participation, not sole control over all inherited copies. Define how shared-description ambiguity affects eligibility and release verification.
- Keep production JSON/exit compatibility and publish explicit platform evidence/limitations.
Priority: P2 safety hardening. Parent: #100. No real Codex signaling, elevated production diagnostics, native dependency, or Windows support is part of this issue's creation.
Activity
abruption commentedon Oct 14, 2026
Research update: Draft #139 records synthetic guard-delay propagation and hardened unpublished fixtures. A finite delay while holding native coordination increased the cooperating waiter's delay; this is not a reproduction of a Linux kernel hang or a bound for synchronous procfs I/O.
F2 remains unexecuted on Linux. Its in-process product inspection has been removed and
F2_DISTis refused because a synchronous inspection stall prevents timers and cleanup from running. Separate-process observation, dumpable=1 candidate controls, actual native access and the remaining fault/storage matrix are still needed.#137 has separately rebased onto v0.4.6 main at
b483cd5; all 39 checks pass, but it remains Draft. Targeted pinned-source inspection does not establish a deployed writer's dumpability. This research does not complete #126 or authorize production adoption.abruption commentedon Oct 14, 2026
F2 now has one Linux access-matrix measurement, recorded in Draft #139. The test used
cfa2ebafixtures under an unprivileged same-user UID/EUID on Linux 7.0.0-1013-oracle/aarch64, Node24.18 and Python3.12. Both requested dumpability states were confirmed by PR_GET_DUMPABLE. The runner exited 0 with no failures/incomplete results; both holders exited normally and were absent at the post-check.Dumpable=1 allowed FD discovery, identity, fdinfo and executable reads and produced one exclusive FLOCK record. Dumpable=0 denied those reads with EACCES while cmdline, start ticks and status remained readable. The proc directory and fdinfo directory retained the user UID; only the fd directory became root-owned. The original combined fd/fdinfo UID prediction was wrong: fdinfo's 0555 directory is exempt from the pinned v6.17 ownership reassignment. Its file access still uses a ptrace permission check.
Raw result SHA-256:
656c1d08d816303dfac870a87e426f4ace0f6972698a46f491a81a4c3b1900fc(remote/downloaded copies matched). Owned remote scratch was removed after preserving the evidence. This measurement did not execute #137 or prove native Codex accessibility/classification. Separate-process inspection, candidate controls and the remaining safety gates are still open.