Skip to content

P5 O8: the org session logs each attempt's start (number, pid) and end; the double sign-in's cause recorded as unknown - #304

Merged
SSFSKIM merged 3 commits into
masterfrom
p5-o8-one-signin
Oct 28, 2026
Merged

SSFSKIM merged 3 commits into
masterfrom
p5-o8-one-signin

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 28, 2026

Copy link
Copy Markdown
Owner

P5 O8: at M1's staging sitting (P5 DL 116) a single Sign in made two browser trips and two POSTs to the hub. No end was logged between them, and both ran in one main process (pid 60479, electron-vite dev at 36cced3, no HMR line). This PR is the diagnostic. It does not fix a cause, because the cause is still unknown.

What it changes

  • src/main/org/org-session.ts: each attempt (register, sign in, re-anchor) logs its start with an attempt number and the process pid, for example [org] attempt 1: register (org …), pid 60479. It also logs its end exactly once, whichever way it ends:

    • done
    • refused <code>
    • ended
    • fenced
    • cancelled at <step>, where the step is the registration step it had reached, or sign-in or re-anchor
    • ended by sign-out
    • ended by quit

    The end of an earlier attempt is guarded by its number, so a late settle cannot log against a newer attempt. With this, two browser trips in a log always show why there were two.

  • src/main/org/org-session.test.ts, three tests:

    • start and end lines with a Cancel between two attempts;
    • a refused attempt followed by one that completes;
    • an attempt still held at close(), which logs ended by quit at once, with no later line once its work settles. This one came from a reviewer-medium P2 and was written test-first.
  • src/renderer/src/settings-tab/OrgSection.test.tsx: the section can be rendered under <StrictMode>. A new test pins that one Sign in sends exactly one org.register and no org.cancel.

Cause: unknown

  • Main side: a second register while an attempt waits is refused busy, and attempt is non-null all through approval. Before this PR, only cancel(), signOut() and close() could end an attempt without logging it.
  • Renderer side: the only callers of org.register are the Sign in click and the Enter handler. StrictMode's double mount does not reproduce a second call (the new test).
  • The tree used at the sitting, 36cced3, has the same org code as master.
  • The most likely explanation is a Cancel click followed by a second Sign in, since pair had left the code on the clipboard. The owner doesn't remember what the Org section showed.

A staging re-check after this lands closes the question either way. If the new log lines show cancelled at … between the trips, it was a Cancel, which the coordinator does not count as a defect. If they show two pids, it was a second dev process. Anything else is still open.

Validation Evidence

  • npx vitest run --project node src/main/org/org-session.test.ts: 59 passed (59). Before the close() fix, the new quit test failed (1 failed | 58 skipped under -t "at quit").
  • npx vitest run --project renderer src/renderer/src/settings-tab/OrgSection.test.tsx: 14 passed (14).
  • Class 1a at 23f9775: run 40728560096.
  • Class 1a at 6f2e9ee (merged with origin/master 1bf619c): run 40729854230, green (static, unit, probes).
  • reviewer-medium on 23f9775 found one P2: close() did not log the active attempt's end. Fixed in 87d6288 with the test above.

Residue

None.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)

…process's pid) and its end, a cancel or a fence included; a StrictMode test pins one org.register per Sign in

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…uit), before the fence that would leave it silent

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T16:57:12.649715Z 6f2e9ee PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit 6c29138 into master Oct 28, 2026
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
…ble (cause unknown)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
…, docs)

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
…s cancel flake fixed (O8)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant