Skip to content

id(serve): /proc stat start-time parser tests use the parser as its own oracle — no independent field-22 coverage (from PR #8667) #8816

Closed

Description

@dezren39

Finding (unaddressed PR review comment)

Codex P1 on merged PR #8667 — comment #8667 (comment) by chatgpt-codex-connector[bot], 2026-11-11T12:14:34Z, at pkgs/id/src/commands/serve.rs:3279:

Add property coverage with an independent start-time oracle — The regression obtains actual through the same parser used by is_process_alive, so accidentally extracting another numeric /proc/<pid>/stat field would still pass both assertions. The new parser has a meaningful invariant—extracting field 22 regardless of spaces or parentheses in comm—but only receives this self-referential example coverage. Extract the string parsing into a helper and add property tests using generated process names and an independently selected field-22 value, as required by the repository's testing doctrine.

No-response evidence

Still live on current main (verified 2026-11-11, two gh api reads)

pkgs/id/src/commands/serve.rs on main: get_process_start_time (line ~225) still parses the stat string inline (no extracted string-parsing helper), and the regression tests still use the parser as its own oracle — test_is_process_alive_current_process asserts is_process_alive(pid, get_process_start_time(pid)) and test_is_process_alive_reused_pid derives actual from get_process_start_time(pid) (lines ~3274–3290). If the parser extracted the wrong field, both assertions would still pass. The proptest cases in this file cover web-bindings parsing, not the stat parser.

Acceptance criteria

  • The /proc/<pid>/stat start-time parsing is covered by tests whose expected value is selected independently of the parser under test (e.g. an extracted string-parsing helper plus property tests over generated comm values with spaces/parens and an independently chosen field-22 value), or the finding is resolved by a documented decision on this issue.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/highImportant and time-sensitive
    on Nov 12, 2026
  2. developing-today commented on Nov 12, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 12, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  4. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 12, 2026
  5. 8 remaining items

  6. dezren39 commented on Nov 12, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked (CI wait)

  7. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 12, 2026
  8. dezren39 commented on Nov 12, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up (resume)

  9. dezren39 commented on Nov 12, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

  10. dezren39 commented on Nov 12, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (already done)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/highImportant and time-sensitivesource/pr-comment-reviewFiled by the pr-comment-review jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions