Skip to content

_REMEMBER_PHASE is write-only: nothing reads it, and it is not exported #700

Closed

Description

@fdaviddpt

Found by the release audit for v0.33.0 (round 1, dispatch token rel-0330-429b3dd1),
ranked here as non-blocking: it sits in no row of the ranking table, and nothing is
misreported because nothing is emitted at all.

scripts/session-start-hook.sh assigns _REMEMBER_PHASE at three places -- :382,
:868 and :1882. A repo-wide sweep finds no reader:

grep -rn "_REMEMBER_PHASE" . --exclude-dir=.git

returns exactly those three assignments. None is exported, so no child process, no log
line and no external profiler can observe it either.

The comment at :862-867 justifies it as making "how much is still synchronous"
answerable -- "a trace cannot tell a deferred child from a command substitution by pid
alone". That is a real problem and this variable does not currently solve it: the value
never leaves the shell that sets it.

Three honest fixes, in increasing order of usefulness:

  • delete it, and the comment with it;
  • export it, so a traced child carries the phase it was spawned in -- which is what the
    comment describes wanting;
  • log it at the phase transitions, so the answer survives into hook-errors.log without
    a tracer attached.

Lowest-consequence finding of that audit round. Filed rather than fixed in the release
branch because it changes no behaviour either way, and picking between the three above is
a design call rather than a repair.

[AI-generated]

Activity

  1. added a commit that references this issue on Sep 15, 2026
  2. added
    cohort-12
    lane-capture
    on Sep 15, 2026
  3. added a commit that references this issue on Sep 17, 2026
  4. added 3 commits that reference this issue on Oct 4, 2026
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

    cohort-12lane-capture

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions