From 3cb8c0e902f87907ffbbfde3f057040193a01009 Mon Sep 17 00:00:00 2001 From: Travis Gilbert <1travisgilbert@gmail.com> Date: Wed, 5 Aug 2026 17:29:39 -0400 Subject: [PATCH] Fix Studio patch 0003 TypeScript so Copilot retirement can build. Narrow chatStatusEntry affectsConfiguration and drop the unused assertDefined import that failed the first Railway reh-web compile. --- ...m-chat-register--plan-local-20260805a.json | 10 +++-- .../EXECUTE-REPORT-CR001-CR002.md | 43 +++++++++++++++++++ packaging/commonplace-studio/LEDGER.md | 10 ++++- ...03-retire-default-chat-agent-copilot.patch | 25 ++++++++++- 4 files changed, 80 insertions(+), 8 deletions(-) create mode 100644 docs/plans/theorem-chat-register/EXECUTE-REPORT-CR001-CR002.md diff --git a/.harness/checklists/theorem-chat-register--plan-local-20260805a.json b/.harness/checklists/theorem-chat-register--plan-local-20260805a.json index e47b17d2..7fd35d45 100644 --- a/.harness/checklists/theorem-chat-register--plan-local-20260805a.json +++ b/.harness/checklists/theorem-chat-register--plan-local-20260805a.json @@ -49,10 +49,11 @@ { "id": "CR-001", "title": "Land Copilot retirement + redeploy Studio image", - "status": "pending", + "status": "verifying", "oracle_class": "live", "implementation_mode": "product", - "evidence_class": "pending", + "evidence_class": "artifact", + "evidence_note": "PR #190 merged as 644d1ba8; Railway deploy 23822b99 BUILDING that commit. Live product.json proof pending SUCCESS.", "substitution_allowed": false, "live_oracle_required": true, "grounding": [ @@ -72,10 +73,11 @@ { "id": "CR-002", "title": "Repair sticky empty /workspace/repo", - "status": "pending", + "status": "verifying", "oracle_class": "live", "implementation_mode": "product", - "evidence_class": "pending", + "evidence_class": "artifact", + "evidence_note": "entrypoint repair on main; WORKSPACE_REPO=Travis-Gilbert/CommonPlace set. Live HEAD/package.json proof pending new image boot.", "substitution_allowed": false, "live_oracle_required": true, "grounding": [ diff --git a/docs/plans/theorem-chat-register/EXECUTE-REPORT-CR001-CR002.md b/docs/plans/theorem-chat-register/EXECUTE-REPORT-CR001-CR002.md new file mode 100644 index 00000000..704a021f --- /dev/null +++ b/docs/plans/theorem-chat-register/EXECUTE-REPORT-CR001-CR002.md @@ -0,0 +1,43 @@ +# Execute Report: theorem-chat-register CR-001 / CR-002 + +Plan: `plan-theorem-chat-register-20260805a` + +## Summary +- Final condition: [PR #190](https://github.com/Travis-Gilbert/CommonPlace/pull/190) merged; first Studio builds failed on patch-0003 TypeScript (chatStatusEntry `string|undefined`, unused `assertDefined`). Fix regenerating in follow-up PR. Live image is still pre-retirement `706bea01` (old commit SUCCESS) with `WORKSPACE_REPO` set but old entrypoint that does not compose the clone URL. +- Goal achieved: **partial** — source + env wired; live Copilot retirement and volume reseed still blocked on a green Studio image. +- Biggest remaining risk: further compile fallout from making `defaultChatAgent` optional; token leak in Docker build logs (rotate `THEOREM_GIT_TOKEN`). +- Next action: land patch-0003 TS fix, wait for SUCCESS, then prove product.json + `/workspace/repo` HEAD. + +## Checklist Reconciliation +| ID | Task | Status | Evidence | Validation | Notes | +|---|---|---|---|---|---| +| CR-000 | Plan + checklist | done | PLAN.md + checklist JSON on main | artifact | local_projection_only | +| CR-001 | Copilot retirement + redeploy | verifying | PR #190 squash `644d1ba8`; ledger-gate green pre-merge | live pending | wait for SUCCESS image | +| CR-002 | Sticky empty repo repair | verifying | entrypoint compose URL + HEAD repair; `WORKSPACE_REPO` set | live pending | needs new entrypoint + clone | +| CR-003..007 | Register /chat / OpenWork | pending | — | — | not started this slice | + +## Changes Made +| Area | Files | Summary | Why | +|---|---|---|---| +| Studio product | `product.overlay.json`, patch `0003`, `build.sh`, smoke/ledger | Delete Copilot host keys, strip `extensions/copilot`, seed `chat.disableAIFeatures` | CR-001 | +| Workspace | `entrypoint.sh`, `railway.toml` | Compose clone from `WORKSPACE_REPO`+token; reseed sticky empty git | CR-002 | +| Plan | `docs/plans/theorem-chat-register/*`, checklist | Durable board for dual-mount Theorem chat | CR-000 | + +## Validation +| Check | Result | Notes | +|---|---|---| +| `ledger-gate.sh` | pass (pre-merge) | 3 patches | +| Overlay null-delete | pass (pre-merge) | `defaultChatAgent` key absent | +| PR merge | pass | #190 squash to main | +| `WORKSPACE_REPO` on Railway | pass | `Travis-Gilbert/CommonPlace` | +| Live product.json / no copilot | not-run | build in flight | +| Live `/workspace/repo` HEAD | not-run | needs new entrypoint boot | + +## Remaining Work +- What remains: deploy SUCCESS + live oracles for CR-001/CR-002; then CR-003+ Theorem register. +- Why: Studio image rebuild is the live gate. +- Next step: poll Railway; smoke `product.json`, `extensions/copilot`, `git rev-parse HEAD` in `/workspace/repo`. + +## Ops notes +- Prefer GitHub-triggered deploys for this service; do not `railway up` from repo root (wrong toml trap). +- Rotate `THEOREM_GIT_TOKEN` if it was exposed in operator logs; do not paste it into reports. diff --git a/packaging/commonplace-studio/LEDGER.md b/packaging/commonplace-studio/LEDGER.md index 3f13595f..8fd1195f 100644 --- a/packaging/commonplace-studio/LEDGER.md +++ b/packaging/commonplace-studio/LEDGER.md @@ -122,10 +122,16 @@ replacement for `IDefaultChatAgent`. extensions workbench, language-model tools, chat widget, chat status, agent-sessions welcome, default-account contribution). 3. Stub onboarding's module-level `defaultChat` when the key is absent so the - module can load. -4. Retitle the web getting-started walkthrough from "VS Code for the Web" to + module can load; drop the unused `assertDefined` import (TS6133). +4. Guard `chatStatusEntry`'s `affectsConfiguration(...)` call: optional + `defaultChatAgent` makes `?.completionsEnablementSetting` a + `string | undefined`, which tsgo rejects (TS2345). Narrow before the call. +5. Retitle the web getting-started walkthrough from "VS Code for the Web" to "Commonplace Studio". +First Railway build of the retirement commit failed on (3)+(4); the patch was +regenerated against a clean `1.131.0` apply before re-merge. + Companion configuration (not this patch): overlay deletes `defaultChatAgent` and `voiceWsUrl`, clears Copilot auto-update/auth grants, `build.sh` removes `extensions/copilot` from the server artifact, and the workspace entrypoint diff --git a/packaging/commonplace-studio/patches/0003-retire-default-chat-agent-copilot.patch b/packaging/commonplace-studio/patches/0003-retire-default-chat-agent-copilot.patch index 4c2dd58b..5cdf8c35 100644 --- a/packaging/commonplace-studio/patches/0003-retire-default-chat-agent-copilot.patch +++ b/packaging/commonplace-studio/patches/0003-retire-default-chat-agent-copilot.patch @@ -155,6 +155,19 @@ index e67b4dba..8f76b654 100644 button.enabled = isEnabled(); } updateIntervalTimer(); +diff --git a/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.ts b/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.ts +index acdaff6b..6c9c7323 100644 +--- a/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.ts ++++ b/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.ts +@@ -195,7 +195,7 @@ export class ChatStatusBarEntry extends Disposable implements IWorkbenchContribu + this._register(this.editorService.onDidActiveEditorChange(() => this.onDidActiveEditorChange())); + + this._register(this.configurationService.onDidChangeConfiguration(e => { +- if (e.affectsConfiguration(product.defaultChatAgent?.completionsEnablementSetting) || e.affectsConfiguration(ChatConfiguration.TitleBarSignInEnabled)) { ++ if ((!!product.defaultChatAgent && e.affectsConfiguration(product.defaultChatAgent.completionsEnablementSetting)) || e.affectsConfiguration(ChatConfiguration.TitleBarSignInEnabled)) { + this.update(); + } + })); diff --git a/src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts b/src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts index 26864fda..97052f50 100644 --- a/src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts @@ -257,10 +270,18 @@ index 168a3d01..1069d964 100644 type: 'steps', steps: [ diff --git a/src/vs/workbench/contrib/welcomeOnboarding/browser/onboardingVariationA.ts b/src/vs/workbench/contrib/welcomeOnboarding/browser/onboardingVariationA.ts -index c1fb3e12..8ad5896d 100644 +index c1fb3e12..bef31502 100644 --- a/src/vs/workbench/contrib/welcomeOnboarding/browser/onboardingVariationA.ts +++ b/src/vs/workbench/contrib/welcomeOnboarding/browser/onboardingVariationA.ts -@@ -77,8 +77,45 @@ type OnboardingActionEvent = { +@@ -10,7 +10,6 @@ import { isCancellationError } from '../../../../base/common/errors.js'; + import { StopWatch } from '../../../../base/common/stopwatch.js'; + import { URI } from '../../../../base/common/uri.js'; + import { isWindows, isMacintosh, isLinux } from '../../../../base/common/platform.js'; +-import { assertDefined } from '../../../../base/common/types.js'; + import { FileAccess } from '../../../../base/common/network.js'; + import { ILayoutService } from '../../../../platform/layout/browser/layoutService.js'; + import { KeyCode } from '../../../../base/common/keyCodes.js'; +@@ -77,8 +76,45 @@ type OnboardingActionEvent = { type EnterpriseSignInUiState = 'options' | 'instance' | 'progress';