GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — impl(fleet): session state — session id in env + worktree pwd-file · Issue #9075 · developing-today/code

impl(fleet): session state — session id in env + worktree pwd-file #9075

New issue
Copy link
New issue
Copy link
Closed
Closed
impl(fleet): session state — session id in env + worktree pwd-file#9075
Copy link
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/mMedium: expected under 1 day of workkind/featureNew feature or capability requestpriority/normalOrdinary priority (the default)status/in-reviewstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@developing-today-fleet
developing-today-fleet
bot
opened on Nov 12, 2026
Issue body actions

Design: doc/2026-11-12T22-50-00Z_design_pm-board-hierarchy-genealogy/note.md section 14. Each fleet start assigns a session id, stored in the environment of everything fleet launches AND in a pwd-file at the repo root of every worktree it operates in.

Acceptance:

  • fleet start writes the session id to env + pwd-file; a later bare fleet invocation in the worktree recovers it without being told.
  • Resolution order demonstrated: explicit argument > env > pwd-file.
  • The create-path stamp (fleet gh superset slice) records the recovered session id into provenance.session_id on a real created item.
  • Pwd-file location/name documented in the fleet docs; stale pwd-files (session ended) are detectable and do not silently misattribute new work.

Activity

Next
  1. developing-today-fleet
    added
    kind/featureNew feature or capability request
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 12, 2026
  2. developing-today commented on Nov 12, 2026

    @developing-today
    developing-todayBot
    on Nov 12, 2026 – with developing.today
    Contributor
    More actions

    CODE-2779

  3. dezren39
    added a parent issue on Nov 12, 2026
    • pm stack: multi-board hierarchy + full task genealogy #9060
  4. dezren39 commented on Nov 13, 2026

    @dezren39
    dezren39
    on Nov 13, 2026
    Member
    More actions

    Cross-link: #9178 §1 builds on this session-state work — a new resume_session_id column on the queue tasks table names the session a claim should continue, using the env / pwd-file session identity specified here. Companion decision record seed: FDR-0001 in #9180.

  5. github-actions
    assigned
    dezren39
    on Nov 13, 2026
  6. dezren39
    marked this as blocking 2 issues on Nov 13, 2026
    • design(pm-orchestration): Session capability, existing-binding lookup and message delivery receipts #9505
    • design(pm-orchestration): Session capability panel, live directions, status report and agent request #9474
  7. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    Member
    More actions

    Agent note — triaged (lane any-m, task 18825)

    State: triaged
    Work kind: task/small-fix (implementation in the fleet multicall binary)
    Priority: priority/normal — fleet/PM-stack infrastructure (priorities brief line 4, PM stack as a real hub); not fleet-stalling, so not band 10. It is however a named dependency: #9178 builds on it, and MOB-07 / DSP-05 slices are dep-blocked in part on #9075.
    Effort: effort/m

    Fresh verification (2026-11-17):

    • Issue impl(fleet): session state — session id in env + worktree pwd-file #9075 is OPEN, labels kind/feature + app/pm-stack only; no held / user/owned / do-not-merge / do-not-auto-edit labels.
    • No implementation on current main (22e7682): no fleet session-id env assignment, no worktree pwd-file, no resolution-order code in pkgs/fleet or pm-stack (the MCPX_SESSION_ID hits are the unrelated mcpx session mechanism).
    • Design source is doc/2026-11-12T22-50-00Z_design_pm-board-hierarchy-genealogy/note.md section 14.
    • Consumer gate: acceptance item 3 (create-path stamp writes provenance.session_id) depends on impl(fleet): fleet gh Metadata superset — create-path stamping + DB insert (extends #9016) #9073, which is still OPEN — that integration point is sequenced in the follow-on, not a blocker for the core session-state work (env + pwd-file + resolution order + stale detection + docs are independent).

    First concrete step for the follow-on: in the fleet binary, assign a session id at fleet start, export it to launched children, write the pwd-file at each operated worktree root, and implement recovery with resolution order explicit argument > env > pwd-file, with stale pwd-file detection.
    Acceptance check for the fix: all four acceptance items on this issue demonstrated, including the #9073 create-path stamp recording the recovered session id once that slice is available (or the follow-on is dep-blocked on #9073 for that item only).

    Follow-on: a scoped small_fix queue packet for this issue is enqueued by this triage (dedupe-checked); this triage task completes as triaged naming it.

  8. dezren39
    added
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 17, 2026
  9. 63 remaining items

  10. dezren39
    removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 22, 2026
  11. dezren39 commented on Nov 22, 2026

    @dezren39
    dezren39
    on Nov 22, 2026
    Member
    More actions

    Verification follow-up for task 20275: retried bun test .opencode/plugin/mcpx/session-created.test.ts after the Rust suite finished; Bun 1.4.4 again timed out at 120s and reported out-of-memory (8.52 GB peak RSS). The test remains unverified. Queue task 20275 is recorded complete with canonical PR #12326 as the deliverable; issue #9075 remains OPEN with status/in-review, and #9073-dependent create provenance is still outstanding.

  12. dezren39
    added a commit that references this issue on Nov 23, 2026

    Merge pull request #12838 from developing-today/felix/12584-session-r…

    1d6d8f0
  13. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    Member
    More actions

    Lane felix starting on #9075 (session state: session id in env + worktree pwd-file). Done check first against current origin/main; then the bounded slice if anything is missing.

  14. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    Member
    More actions

    Picked up by felix — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while felix posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  15. dezren39
    added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 23, 2026
  16. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    Member
    More actions

    Verification record — lane felix, 2026-11-23: #9075 is already implemented on main; nothing to land.

    Done check against origin/main 3721eefa2, item by item:

    1. Env + pwd-file write and bare-invocation recovery — landed. pkgs/fleet/crates/fleet/src/session_state.rs: the pwd-file is .fleet-session-id at the Git worktree root (per-worktree, not the common Git dir; root .gitignore line 116 ignores it). fleet init and supported domain invocations resolve identity once via session_state::initialize (main.rs run_domain_with_initializer; also the fleet gh closure path), set FLEET_SESSION_ID for everything fleet launches, and persist a supplied identity to the pwd-file, so a later bare invocation in the worktree recovers it (resolve_marker + tests supplied_identity_is_persisted_for_a_later_bare_invocation). One deliberate shape note: the id is assigned at session start by the OpenCode session plugin (exported as FLEET_SESSION_ID) or bound explicitly via fleet session bind [--session-id ID] — fleet binds and propagates that identity rather than minting a competing one, which is what keeps it joinable with the queue's claim_session_id and the OpenCode session record. Landed via commits 22bf6e1 / d260bb5 / 471847b / fabbdb7.
    2. Resolution order demonstrated — landed. resolve(): explicit argument > FLEET_SESSION_ID > OPENCODE_SESSION_ID > pwd-file, with unit tests naming each step (explicit_argument_wins_over_both_environments_and_pwd_file, fleet_env_precedes_opencode_env_and_pwd_file, opencode_env_precedes_pwd_file) plus a proptest over the ses_ id format.
    3. Create-path stamp — landed. The native create path (impl(fleet): fleet gh Metadata superset — create-path stamping + DB insert (extends #9016) #9073 slice 9, commit 31d0905) calls gather_facts in prepare_create (gh_metadata.rs): session_id comes from FLEET_SESSION_ID, else the recovered session via session_state::initialize(None) (env → pwd-file), and assemble_provenance stamps it as provenance.session_id in the full provenance set; the §8.2 golden vectors reproduce byte-exact with session_id populated. (Evidence shape: code path + golden vectors + the impl(fleet): fleet gh Metadata superset — create-path stamping + DB insert (extends #9016) #9073 fake-gh e2e on its record; I did not mint a throwaway live item for this check.)
    4. Docs + stale detection — landed. pkgs/fleet/README.md section "Session identity in worktrees (impl(fleet): session state — session id in env + worktree pwd-file #9075)" documents the file name/location, the resolution order, and the liveness rule. A marker is accepted only when the local OpenCode server returns a matching, non-archived session record (opencode-probe feature, in the full/connect feature sets); an ended or unverifiable marker fails closed with a named stale error instead of silently misattributing — and gather_facts degrades to a null stamp rather than failing creates.

    Fresh test evidence (remote only): fleet queue dispatch fp_1d4438448a437c80d43019afd60b4ed2, run https://github.com/developing-today-forks/fleet/actions/runs/45196304833 at 3721eefa2 — cargo test -p fleet --features full from pkgs/fleet: succeeded (cargo exit status is the oracle; the tail shows the closing suites green). Two earlier dispatches failed before running any test — a bare-SHA checkout failure and a wrong-workspace command on my side — neither touched the code under test.

    Close recommendation: Felix can close #9075 on this record; the downstream consumers (#9178's resume_session_id, MOB-07 / DSP-05) build on this landed state.

  17. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    Member
    More actions

    Released by felix (outcome: done). Verified already implemented on main 3721eef: session_state.rs (env + .fleet-session-id pwd-file, resolution order, stale fail-closed), README docs, and the #9073 create-path stamp of provenance.session_id via gather_facts recovery. Fresh remote suite green (run 45196304833). No PR; close rests with Felix.

  18. dezren39
    removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 23, 2026
  19. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    Member
    More actions

    Closed — Felix, 2026-11-23. Verified already done on main: session_state.rs implements the env + pwd-file identity with the named resolution order, the #9073 create path stamps provenance.session_id from it, and the README documents the stale-marker rule. Fresh evidence from my lane: cargo test -p fleet --features full passed remotely at current main (run 45196304833). Verification record above (7104420744). Downstream #9178/MOB-07/DSP-05 build on this landed state.

  20. dezren39
    closed this as completedon Nov 23, 2026
  21. developing-today
    added
    status:done
    on Nov 23, 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

    app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/mMedium: expected under 1 day of workkind/featureNew feature or capability requestpriority/normalOrdinary priority (the default)status/in-reviewstatus:donetask/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

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.