Skip to content

The session view opens where the session lives, and a running write says so - #156

Merged
brettheap merged 1 commit into
mainfrom
fix/session-rekey-and-running-write
Aug 10, 2026
Merged

brettheap merged 1 commit into
mainfrom
fix/session-rekey-and-running-write

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

Two defects behind one report ("i get the same error"), both read out of the
serve log after the console-token repair landed. Neither is the token: no
console refusal has occurred since the page reloaded on the fixed bundle.

THE SESSION VIEW NEVER OPENED. A create from a PROJECT view landed — 200,
draft/company-provisioning-… opened, its snapshot generated — and the page
then asked:

GET /snapshot.json?repository=xfactory&ref=draft/company-provisioning-…
-> 404 no such snapshot

xfactory is a PROJECT id, not a repository; the session is registered as
openxFactory @ draft/company-provisioning-…. So the create succeeded and its
document view could not be loaded.

This is #152's ruling one step later in the flow. The create already asks the
serve which repository it writes to (lens.js writableRepository, because
under a composed view the rendered snapshot's repository is the project id).
The RE-KEY that follows the create still inferred: it read the view's own key,
and under a composed view sourceKeyFor(null) is null, so it fell through to
the project id. rekeyToSession now reads the serve's own declaration first.
A session ref can exist ONLY in the repository the serve writes to — a create
naming any other is refused by refuse_foreign_repository — so this is the
one authority, and the test pins the wire fact it rests on: a session snapshot
answers to its owning repository and to no other name.

A RUNNING WRITE NOW SAYS SO. Brett pressed create twice, and the log says what
that cost:

23:51:40  press one opens the session
23:51:41  document written, committed
23:51:42  session snapshot regenerated
23:51:54  press two -> 409 corpus documents are create-only
23:53:11  press one -> 200

The first answer he read was the refusal of his own duplicate, for work that
had in fact landed — and the create that landed answered 77 seconds later. The
cause is that a create OPENS A BRANCH SESSION (worktree, branch, commit,
regenerated snapshot) and all the button did was grey out: disabled says "not
now" and nothing about "working", so a second create dialog was pressed.

The create and the three session verbs now carry a running label while the
request is in flight, restored in finally so a refusal is retriable in place
with its own words back on the button — the shape notebook.js already used
("opening NotebookLM…"). The duplicate itself is still refused, and correctly:
the create is create-only inside a session too (FR-018).

Suites: tests/ideation-dashboard + tests/ideation_dashboard — 2831 passed,
19 skipped (exit 0). The stranded-page browser proof re-run against a scratch
checkout: 10/10, zero page errors.

🤖 Generated with Claude Code

…ays so

Two defects behind one report ("i get the same error"), both read out of the
serve log after the console-token repair landed. Neither is the token: no
console refusal has occurred since the page reloaded on the fixed bundle.

THE SESSION VIEW NEVER OPENED. A create from a PROJECT view landed — `200`,
`draft/company-provisioning-…` opened, its snapshot generated — and the page
then asked:

    GET /snapshot.json?repository=xfactory&ref=draft/company-provisioning-…
    -> 404 no such snapshot

`xfactory` is a PROJECT id, not a repository; the session is registered as
`openxFactory @ draft/company-provisioning-…`. So the create succeeded and its
document view could not be loaded.

This is #152's ruling one step later in the flow. The create already asks the
serve which repository it writes to (lens.js `writableRepository`, because
under a composed view the rendered snapshot's `repository` is the project id).
The RE-KEY that follows the create still inferred: it read the view's own key,
and under a composed view `sourceKeyFor(null)` is null, so it fell through to
the project id. `rekeyToSession` now reads the serve's own declaration first.
A session ref can exist ONLY in the repository the serve writes to — a create
naming any other is refused by `refuse_foreign_repository` — so this is the
one authority, and the test pins the wire fact it rests on: a session snapshot
answers to its owning repository and to no other name.

A RUNNING WRITE NOW SAYS SO. Brett pressed create twice, and the log says what
that cost:

    23:51:40  press one opens the session
    23:51:41  document written, committed
    23:51:42  session snapshot regenerated
    23:51:54  press two -> 409 corpus documents are create-only
    23:53:11  press one -> 200

The first answer he read was the refusal of his own duplicate, for work that
had in fact landed — and the create that landed answered 77 seconds later. The
cause is that a create OPENS A BRANCH SESSION (worktree, branch, commit,
regenerated snapshot) and all the button did was grey out: `disabled` says "not
now" and nothing about "working", so a second create dialog was pressed.

The create and the three session verbs now carry a running label while the
request is in flight, restored in `finally` so a refusal is retriable in place
with its own words back on the button — the shape notebook.js already used
("opening NotebookLM…"). The duplicate itself is still refused, and correctly:
the create is create-only inside a session too (FR-018).

Suites: tests/ideation-dashboard + tests/ideation_dashboard — 2831 passed,
19 skipped (exit 0). The stranded-page browser proof re-run against a scratch
checkout: 10/10, zero page errors.
Copilot AI lite review requested due to automatic review settings August 10, 2026 04:10

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @brettheap! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

@brettheap
brettheap merged commit 67170b5 into main Aug 10, 2026
@brettheap
brettheap deleted the fix/session-rekey-and-running-write branch August 10, 2026 04:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes two UX/flow defects in the Ideation Dashboard staging workbench: (1) session re-keying under composed/project views now uses the serve-declared writable repository (instead of inferring from view keys), and (2) long-running write actions visibly indicate “in progress” on their own buttons to prevent duplicate presses and misleading first-visible errors.

Changes:

  • Update rekeyToSession to prioritize /capabilities’ repository (probedCaps.repository) before view-derived fallbacks, preventing 404 snapshot loads under composed/project views.
  • Add “running” button labels (and restoration in finally) for create + session verbs while requests are in flight.
  • Add regression tests pinning the repository authority ordering and the running-label behavior; update the session runbook with both findings.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/ideation-dashboard/test_staging_workbench.py Adds a test pinning “running label + restore” behavior for create/session write buttons.
tests/ideation-dashboard/test_session_confinement.py Adds a test asserting session snapshots resolve only under the serve’s owning repository and that rekeyToSession consults /capabilities first.
scripts/ideation_dashboard/web/views/swb-session.js Adds running-state label handling for session verbs during in-flight requests.
scripts/ideation_dashboard/web/views/swb-create.js Adds running-state label handling for create while opening a branch session.
scripts/ideation_dashboard/web/app.js Fixes session re-key repository selection to prefer probedCaps.repository over view-derived keys.
docs/ideation-dashboard-session-runbook.md Documents the two defects and their fixes for operators/debugging.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +279 to 287
let payload;
try {
payload = await submitCreate(body, o.fetcher, o.caps, o.repair);
} finally {
submit.textContent = label;
}
await renderOutcome(result, payload, o.onOpenDoc, o.onSessionOpened);
// a refused create is retriable in place; a landed one is done
if (!(payload && payload.ok)) submit.disabled = false;
Comment on lines +505 to +511
let payload;
try {
payload = await submitSession(affordance, body, o.fetcher, o.caps,
o.repair);
} finally {
submit.textContent = label;
}
brettheap added a commit that referenced this pull request Sep 2, 2026
…atus, capacity rows, merge order, and the cross-repository debt at its real scope

An adversarial review found the ACT clean — runbook §5.1 exact, schema-valid,
records discipline intact — and the surrounding RECORD carrying hygiene defects.
NONE OF THE THREE §5.1 WRITES IS TOUCHED: `git diff <prior head> -- governance/`
returns no changed line outside a comment, and `register.yaml` is untouched
entirely. Every number below was re-measured for this commit rather than copied.

THE MEASURED CORRECTIONS

- The claim that every `council-deliberation-worker` run in codexFactory's
  history sits at `01a0c64a` was FALSE. Measured: workflow id 339735899 has
  1113 runs across 166 DISTINCT head shas (2026-08-21 → 2026-09-02), and of the
  30 most recent the `deliberate` job is `skipped` in 30 of 30. The record now
  states the fact at the strength it was measured — the job has never been
  OBSERVED to execute — and quotes the predecessor walk's "at the time of
  writing" hedge rather than strengthening it.
- codexFactory issue #156 was cited as live. It is CLOSED (completed,
  2026-09-02T00:51:24Z). It is now cited as the closed RECORD of the earlier
  855-run measurement, carrying its own "stated as observed, not diagnosed"
  qualification; and searched across three repositories, NO OPEN ISSUE owns "no
  real convening has ever run" as of 2026-09-02. None is filed.
- The projection machinery was overclaimed as deployed and the manual duty as
  retired. hermes-install's evidence record shows the CronJob PRESENT with the
  first scheduled run DUE, one MANUAL migration Job succeeded, and "observe the
  first scheduled refresher run" still on its follow-up list; its `docs/evidence`
  carries eleven records, newest that same deploy record, and its main resolves
  to 7f59baa9 (2026-08-30). The record now says: installed, one manual run
  succeeded, NO scheduled firing observed, duty retired only once one is.
- "Within two hours of merge" is relabelled the SCHEDULE'S PROMISE, and the
  resolution mechanism corrected: the CronJob passes no `--source`, `--source`
  defaults to `github` (cli.py:718), so it reads the repository's DEFAULT BRANCH
  via `GitHubContentsSource.resolve()` (project_register.py:252) — `origin/HEAD`
  is `GitCheckoutSource` (line 180), the operator's local path.

THE HYGIENE THE RECORD OWED

- BOTH required checks are stated. Ruleset 21538893 requires `wallet-validation`
  AND `pytest-suite`; at this head both are red. `wallet-validation` is the act's
  (the pinned reader's defect); `pytest-suite` is INHERITED from main, failing
  `tests/doc-health/test_release_tag_publication.py::test_this_repository_reads_zero_and_the_probe_can_fire`,
  the same single test main's own run 33621990229 fails.
- THE MERGE ORDER GAINS ITS MISSING STEP: after the pin bump lands on main,
  MERGE MAIN INTO THIS BRANCH — a pin bump on main does not move this branch's
  gitlink — re-run `wallet-validation` green on this head, then admin-merge under
  B2. Grounded on `neutral-product-pin`'s ratified "Repointing the reader and
  editing what it reads is one human-only act".
- THE CAPACITY TABLE GAINS ITS TWO MACHINE-HELD ROWS: the coordinator performs
  the admin-merge on the ratifier's word, and an authoring agent composed the
  bytes. The ratifying human did not type the register, and grant-mrc-0001's
  header now says so beside its "This write is an OPERATOR ACT" sentence.
- grant-mrc-0002's header gains an append-only note that at the pinned reader
  this act does NOT pass `wallet-validation` at all — the required check is red
  by design of the defect, not of the act.
- THE CROSS-REPOSITORY DEBT AT ITS REAL SIZE: 90 occurrences across 44 files in
  hermes-install, not one edit — including a VENDORED COPY OF THIS REGISTER under
  `tests/fixtures/review_authority_register/`, so this repository's register now
  disagrees with a copy of itself elsewhere, and none of the 90 will go red.

SMALLER CORRECTIONS: the §12.4/§12.1 attribution; the commit-vs-PR-title and the
one-second `committer.date`/`mergedAt` gap; `grant-revoked-derivation.example.yaml`
is `state: active` (a derived child), only the parent is revoked; BOTH reader
remedies presented with the narrower one recommended, and neither weakening
protection; the §12 byline order; the identity record's knowingly-stale indented
`Status:` header; the append-only tension with a `Status: record` predecessor
(48 added, 0 deleted); "every convening parks" qualified as if-and-when; and the
validator output marked an EXCERPT with five note lines elided.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_012RQo21NbWtnTVsb6JU67at
brettheap added a commit that referenced this pull request Sep 2, 2026
Brett Heap (repository owner) ratified this packet in-session on
2026-09-02, verbatim: "Ratify + merge openxFactory #560". Unlike
add-clearing-dispatch-boundary's ratification (#555), where ratify and
merge were separate acts because #555's own merge was gated on an
inherited pytest failure, Brett's word here carries both acts together:
the ordering precondition (#555 merging first) already discharged on
2026-09-02, and this packet carries no code surface beyond the
governance register family. Status: ratified, with the Ratified: line
and record filed at review/ratification-2026-09-02.md.

Ratifies 3 MODIFIED + 3 ADDED requirements over clearing-dispatch-boundary
(the basis, #555, merged 2026-09-02T09:16Z at ab0bb2d first as required)
and 6 ADDED requirements under the new capability factory-origin-identity
-- the origin-key and sign-on-return rulings from codexFactory issue
#156's 2026-09-01 same-day extension comment, and the register-home
ruling (design D1, sibling governance/factory-identity/, confirmed by the
operator). xFactory#201 (the disposition-row belt for the merge-order
control) closed as unnecessary once that order held.

Ratification authorizes realization (the register rows + disjointness
validator + codexFactory floor entry as one act in this repo; xFactory's
clearing origin-signature verification; codexFactory's packaging and
sign-on-return via draft PR #165; openXwallet's reader scoping) and
performs none of it. No contract byte moves with this act. OQ1
(projection transport), OQ3 (reader-side refusal owner), and the
tranche-3 digest_subject widening remain open, carried rather than
settled.

openspec validate add-cpc-clearing-boundary --strict: valid, zero issues.
--all --strict: 85 passed, 0 failed. proposal-support.py verify: ok.
doc-health proposal-origin, status-validity, location-conformance,
modified-block-currency, promotion-fidelity: exit 0, no findings tied to
this change.

Co-Authored-By: Claude Fable 5 <[email protected]>
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.

2 participants