Skip to content

Carry the installed 0.2.6 stack onto 0.2.7 - #4

Open
neotechnet wants to merge 32 commits into
upstream/v0.2.7from
stack/installed-0.2.7
Open

neotechnet wants to merge 32 commits into
upstream/v0.2.7from
stack/installed-0.2.7

Conversation

@neotechnet

Copy link
Copy Markdown
Owner

Carries the stack installed on 0.2.6 (feat/card-gate 9889b96) onto upstream 0.2.7, and ports the two patches that were only hand edits to the generated client.js into src/client.

Local patches carried: hand-back pointer (upstream PR 780, still open), question lifecycle and void_question, waits a Bot holds on its own sends, waiting clock badge, sidebar coexistence (list in the shell sidebar, every Main Bot tiles, one account button, owned Sessions published as window.__dshBotSessions and dsh-bot:sessions), card gate, plan-mode release.

Gates on this head (21eff5d), Windows:

  • npm test: 1660 tests, 1658 pass, 0 fail, 2 skipped
  • node scripts/build-client.mjs --check: exit 0
  • npm run lint: 0 errors (40 warnings, none on changed lines)
  • smoke bench: not runnable on this Windows box (dev/bench.sh needs setsid); a PowerShell stand-in fails the same way on pristine 0.2.7 as on this branch, so it says nothing about the change

Supersedes fork PRs #1, #2 and #3. Job dsbot-027-upgrade.

Byte for byte the tree installed in the desktop profile on 2026-11-02 (78 of 78 files match).
In a turn another Bot opened, a Bot that is not a Main Bot can no longer
show the user a question card or a plan review. ask_user is refused and
exit_plan_mode is refused by a guard; both refusals name the sender and
tell the Bot to send it a DECISION instead.

Still allowed: Main Bots, turns the user typed, requests whose audience
is the user, a 'deploy to production' card (the production guard reads
only the runner's own transcript), and a job carrying CARD-IT-YOURSELF.

A Main Bot message carrying PLAN-APPROVED turns plan mode off in the Bot
it reaches (queued when a turn is open). DSH_CARD_GATE=off turns all of
it off. Each refusal and relayed approval is one JSON line in
<home>/logs/card-gate.log.
…ith it off

Two faults kept Bots stuck in plan mode:

1. DSH's shipped presets (standard, ptc, cordis) pin plan mode on for every
   new Session (defaultActive: true). DS Bot makes every Bot chat, group
   Session and handoff part on `standard`, so each one started in plan mode.
2. Under a preset, plan mode lives in an isolated group (isolate.planMode),
   so rt.ctx.get('planMode') found nothing and a relayed PLAN-APPROVED was a
   silent no-op. The lookup now reads agentPresets.serviceFor(agent,
   'planMode') first, as parts.js already does for compaction.

ensurePlanOff switches a Bot Session out of plan mode once (recorded in
state.planDefaultOff), on creation, on resume and on first delivery. A later
/plan in that chat stays on. A Bot with planMode 'on', or named in
<home>/plan-mode-keep.json, is left alone. DSH_PLAN_DEFAULT_OFF=off turns it
off. Every attempt is logged to card-gate.log with its outcome.
Merges feat/card-gate (9889b96, the stack installed on 0.2.6) into 0.2.7
and ports the patches that lived only as hand edits to the generated
client.js into src/client, so client.js is rebuilt from source again.

Host side, merged cleanly:
- hand-back pointer (upstream PR 780, still open): a message already read
  mid-turn is handed back as a pointer, not its body again
- question lifecycle and void_question
- waits a Bot holds on its own sends, shown only while the teammate is on it
- card gate and the plan-mode release through the preset realm

Client side, ported onto 0.2.7's sidebar:
- the Bot list sits inside the shell's own sidebar column, every Main Bot
  tiles, a seated account is drawn once, and the owned Sessions are
  published as window.__dshBotSessions and the dsh-bot:sessions event
- a Bot waiting on handed-on work wears a clock opposite its star

Tests: the PR 780 hand-back tests run under 0.2.7's scoped team tools;
the waiting, badge and sidebar tests follow the local behaviour; new
tests cover void_question, the card lifecycle and the owned Sessions.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 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-11-03T19:13:59.703692Z 21eff5d 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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 21eff5dc7e

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// back the one it hid.
const onToggle = () => actions.toggleLeftHidden?.()
// local: sidebar-coexistence. The shell's own sidebar switch hides the column that holds the list.
const onToggle = () => (actions.toggleSidebar ?? actions.toggleLeftHidden)?.()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove the old expansion feedback before toggling the shell

When the user reopens a collapsed sidebar after the viewport has settled, the existing layout effect detects the collapsed-to-expanded transition and calls toggleRef.current() (lines 491–495). With this change, that callback now toggles the shell sidebar itself, immediately collapsing it again. Since the Bot list now lives inside that sidebar, this prevents the user from reliably reopening navigation. Remove or adapt the old expansion-feedback logic along with changing the toggle target.

Useful? React with 👍 / 👎.

const stamps = JSON.parse(updated)
const entries = [
...roster.bots.filter(bot => bot.id !== roster.mainBotId).map(bot => ({ kind: 'bot', item: bot, at: stamps[currentPart(bot)] ?? bot.createdAt })),
...roster.bots.filter(bot => !isMainOf(roster, bot.id) && bot.id !== roster.mainBotId).map(bot => ({ kind: 'bot', item: bot, at: stamps[currentPart(bot)] ?? bot.createdAt })),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep additional Main Bots accessible in rail mode

For a team with multiple Main Bots, this filter removes every Main Bot from the ordinary rows, but the new tileBots grid renders only when wideContent is true. The rail's top section still renders only main, so every additional Main Bot disappears when the layout folds to the rail or a saved rail preference is restored. Render all Main Bots in the rail as well, or retain the additional ones in its ordinary rows.

Useful? React with 👍 / 👎.

Comment on lines +187 to +191
const botId = rt.selfOf?.(sessionId)
if (botId === undefined && !fresh) return undefined
const done = rt.state?.planDefaultOff ?? (rt.state === undefined ? undefined : (rt.state.planDefaultOff = {}))
if (done === undefined || done[sessionId] !== undefined) return undefined
const bot = rt.botOf?.(botId)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Resolve the owning Bot before applying fresh-session defaults

When a Bot with planMode: 'on' or a name in plan-mode-keep.json rolls into a fresh conversation part, createSession() calls this function with fresh: true before the new Session enters the owner tables. Consequently botId and bot are undefined, neither opt-in check can match, and plan mode is disabled and permanently marked as handled for that Session. Pass the owning Bot into this initialization or defer it until ownership is registered so the keep-plan-mode setting survives part switches.

Useful? React with 👍 / 👎.

The gate's log line was a fire-and-forget async mkdir and append. A line
logged near the end of a test could land after the host stopped and its
temp home was being removed, so teardown failed with ENOTEMPTY on the
Node 22 CI job (blocking-question and scoped-tools-creation). The line is
tiny, so it is now written in the same call.

Also keeps the old package name out of the owned-sessions test comment.
Phase 4 of dsbot-027-upgrade proved all five checks on the live
boot, including the HANDED_BACK pointer hand-back read from the
session logs. The state files keep that record in the repo.
The first capture was DPI unaware and kept only the top-left part
of the window, which read as text cut off at the right edge. The
DPI aware capture shows the whole window with the chat wrapping.
Steve's rule (2026-11-03): cards on a job a manager dispatched go to that
manager, not to him. The gate still let two kinds through: a card whose
option was the production approval, and interactive show_view cards,
which were never gated. A deploy approval now always goes back to the
manager, CARD-IT-YOURSELF included, and show_view is judged like ask_user.

Every card decided in a Bot Session is logged with the reason that
decided it, so an allowed card can be traced as well as a refused one.

A plan release is now honoured from the admin of a group the receiving
Bot is in, as well as from a Main Bot: SEO Overlord is the manager for
its group but is not a Main Bot, and its releases were logged as
sender-not-main and did nothing.
The five root state files (CURRENT_STATE, DEPLOYMENT_LEDGER,
NEXT_SESSION_PROMPT, OPEN_ISSUES, VERIFICATION_RESULTS) carried local
paths, Bot names, session ids and job names. This fork is public, so the
record moves to a private home and this branch keeps code only. The files
are kept byte for byte outside the repo; no secrets were in them.
Send every card on a manager's job back to the manager
Steve wants to stop guessing what an agent still needs from him. The
details panel gets two sections below Scheduled tasks, and the chat
header shows how many Unresolved tasks a Bot has, with no number at 0.

Unresolved is what waits on the operator: open question and answer
cards, pending key requests, tool approvals, and open decision loose
ends the Bot owns in ~/.claude/state/loose-ends/register.jsonl, which
is read only (config looseEnds or DS_BOT_LOOSE_ENDS can move it, false
turns it off). Active is derived: the running turn, orders other Bots
handed it, and who it waits on. Git, CI and merges reach none of these
sources, so nothing needs filtering out.

The list rides in the live part of the state answer, so the count
follows a card being answered or a decision closing without a reload.
The Harness listener is moving to the ds-bot:sessions event name. The
installed Harness still listens on dsh-bot:sessions, so the client sends
both, new name first, from one helper in sources.js. The legacy name
sits in its own constant so a later release can drop it in one line
(LE-20261103-033).
Steve wants one click to start a brainstorm. The row types
"brainstorm " at the caret and does nothing else: the word itself is
what turns on the show-options-first stance in his AGENTS.md, so no
mode flips and nothing stays switched on after the turn. The row only
shows where the composer offers insertText.
The composer card carried its own backdrop-filter, which makes it a
backdrop root. The Harness menus that open inside it (the slash and
skills picker, model, permission) then blurred only the card, so the
chat showed through their 58 percent fill sharp and unreadable. The
glass now sits on a ::before layer behind the card's contents, with
isolation on the card; the composer looks the same and the menus
blur as designed.

The shell's idle state dot (pending to-dos, idle sessions) was
neutral-300, 1.43:1 on the light page. It now follows the theme text
at 60 percent, the label-tertiary step: 4.72:1 measured in light mode,
5.56:1 in dark.
A Bot on a prepaid route (the anthropic-credit pilot) must stop billing
before the monthly grant runs out. The guard reads the organization
spend from the Anthropic Admin API cost and usage reports every 15
minutes, warns once at $150, and at $190 moves each guarded Bot to its
fallback model through updateBot, then tells it in its own chat. A
running turn holds the cutoff for up to 10 minutes; $195 does not wait.
A refusal for low credit switches at once. With no good reading for 2
hours the guard fails closed. A missing Admin key, a key that is not an
Admin key, and an API failure are logged apart. The grant period renews
on a configured day, 20 by default. Off unless the plugin config has a
creditGuard block.
The leak scan's old-package-name rule fires on any line that names the
old package without saying legacy. The two event assertions spelled the
legacy name as a literal; they now use legacySessionsEvent, whose value
is still pinned by the assertion just above them. Behaviour is unchanged.
Merge authority: Steve's answered card "deploy to production" on job ds-bot-install-2026-11-04 naming PRs #6-10 in neotechnet/DS-Bot (5:25 PM ET), plus Igor's explicit relayed order.

The minted verify gate was unavailable because Actions does not run on the fork. The local suite output substitutes for it: head 232c723, Node v24.15.0, DSH 0.2.1-rc.5. npm test: 1668 tests, 1666 pass, 0 fail, 2 skipped. build-client --check exit 0. lint: 40 warnings, 0 errors. Leak scan: must fix 0. Log: C:\Projects\logs\ds-bot-install-2026-11-04\ci-pr7.log

The leak scan fix (commit 232c723, the legacy event asserted through legacySessionsEvent) rides the job's existing deploy approval as gate housekeeping, per Igor's order.
Merge authority: Steve's answered card "deploy to production" on job ds-bot-install-2026-11-04 naming PRs #6-10 in neotechnet/DS-Bot (5:25 PM ET), plus Igor's explicit relayed order.

The minted verify gate was unavailable because Actions does not run on the fork. The local suite output substitutes for it: head bc03b2f (base 47201d1 merged in, client.js rebuilt byte-identical), Node v24.15.0, DSH 0.2.1-rc.5. npm test: 1674 tests, 1672 pass, 0 fail, 2 skipped. build-client --check exit 0. lint: 40 warnings, 0 errors. Leak scan: must fix 0. Log: C:\Projects\logs\ds-bot-install-2026-11-04\ci-pr6b.log
…rainstorm-menu-command

# Conflicts:
#	ds-bot/client.js
Merge authority: Steve's answered card "deploy to production" on job ds-bot-install-2026-11-04 naming PRs #6-10 in neotechnet/DS-Bot (5:25 PM ET), plus Igor's explicit relayed order.

The minted verify gate was unavailable because Actions does not run on the fork. The local suite output substitutes for it: head 7ac0188 (base dcaa617 merged in, client.js conflict resolved by rebuilding from src/client), Node v24.15.0, DSH 0.2.1-rc.5. npm test: 1676 tests, 1674 pass, 0 fail, 2 skipped. build-client --check exit 0. lint: 40 warnings, 0 errors. Leak scan: must fix 0. Log: C:\Projects\logs\ds-bot-install-2026-11-04\ci-pr8.log
Merge authority: Steve's answered card "deploy to production" on job ds-bot-install-2026-11-04 naming PRs #6-10 in neotechnet/DS-Bot (5:25 PM ET), plus Igor's explicit relayed order (option 1: accept the green rerun as this PR's gate).

The minted verify gate was unavailable because Actions does not run on the fork. The local suite output substitutes for it. Head 90f0bbc (base df8edfa merged in, client.js rebuild byte-identical), Node v24.15.0, DSH 0.2.1-rc.5.

Run 1 (red): npm test: 1676 tests, 1672 pass, 2 fail, 2 skipped. Failures: test/roster.test.js:867 "a rolled-back Bot does not come back with a save queued before the rollback" (until: the condition did not hold within 2 s, 10027ms) and test/rounds.test.js:549 "a group line longer than a member reads is cut in its prompt..." (TypeError reading 'message', 10222ms). build-client --check exit 0. lint 40 warnings, 0 errors. Leak scan must fix 0. Log: C:\Projects\logs\ds-bot-install-2026-11-04\ci-pr9.log

Isolation: roster.test.js and rounds.test.js alone passed 3 of 3 runs, 89 of 89 each.

Run 2 (green, same head): npm test: 1676 tests, 1674 pass, 0 fail, 2 skipped. build-client --check exit 0. lint 40 warnings, 0 errors. Leak scan must fix 0. Log: C:\Projects\logs\ds-bot-install-2026-11-04\ci-pr9-rerun.log

The two failures are timing waits in files this PR does not touch. The flake is tracked as a separate loose end owned by Harness Code.
…nthropic-credit-guard

# Conflicts:
#	ds-bot/index.js
Merge authority: Steve's answered card "deploy to production" on job ds-bot-install-2026-11-04 naming PRs #6-10 in neotechnet/DS-Bot (5:25 PM ET), plus Igor's explicit relayed order.

The minted verify gate was unavailable because Actions does not run on the fork. The local suite output substitutes for it: head c078ecd (base 541b1a0 merged in; index.js MODULES conflict resolved as the union, operatorTasks before channel and creditGuard last; client.js rebuild byte-identical), Node v24.15.0, DSH 0.2.1-rc.5. npm test: 1688 tests, 1686 pass, 0 fail, 2 skipped. build-client --check exit 0. lint: 40 warnings, 0 errors. Leak scan: must fix 0. Log: C:\Projects\logs\ds-bot-install-2026-11-04\ci-pr10.log

This PR does not write the anthropic-credit route or any creditGuard config; with no config the guard starts and does nothing.
The details panel could not say whether a Bot was working on the user's own ask or on
another Bot's work, because nothing recorded where a turn came from. Record the origin
on the running turn, pass it on with every relay, and keep it on the work a Bot waits
for, so a job keeps its origin while it waits on other Bots and across a restart.

The panel then lists Operator Tasks, Active Tasks and Unresolved Tasks, and the chat
header shows the operator count in the accent colour and the waiting count in the
danger colour as "A · U", each capped at 99+.
The panel and badge tests belong beside the host tests they cover, and the job's declared write scope covers only test/operator-tasks.test.js.
Merge authority: Igor's mint of coding_job_verify PASS b83e525e465a1cd4 for #11 at head 83887fe (verify 7 of 7 PASS), consumed through merge_verify_approval.py check --consume. Steve approved D1(a), D2(a), D3(a), D4(a) for job dsh-optasks. CI: run 42210122851, 13 of 13 checks success, required check Test result pass. Suite 1694 tests, 1692 pass, 0 fail, 2 skipped; build-client --check exit 0; lint 0 errors.
A turn failure was logged with its code, message and request id only, so the
log named the failure but never the line that raised it. The stack is what
names it; the diagnostics entry keeps the first eight frames.

turnFailure keeps error.stack unless the code is AUTH, whose message is
dropped because a provider may echo part of the key. noteTurnFailure passes
it on to the log entry, which already accepted a stack.
* Keep the operator's ask on its Operator Task card

The card showed the Bot's running tool step in place of the ask, so a task
read "Running read on design_fidelity.py" and the request was lost. The card
now keeps the first line of the operator's message and shows the live step
below it as a note. A job handed to another Bot keeps the ask on its work
record so the Bot that picks it up still shows it, and a card whose ask was
not recorded says so instead of showing a step.

* Keep the ask fix inside the operator task files

The plan declared src/host/turns.js out of scope, and the fix does not need it:
the running turn already carries the ask on the work view, and the work record
is saved by handoffs.js. The relay header strip and the work record lookup move
to the operator task view, so the branch touches only the operator task files.
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