Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
"label": "Workshop planner (development environment in Codespaces)",
"onAutoForward": "notify",
"visibility": "private"
},
"10270": {
"label": "DocumentDB Site A \u2014 do not forward",
"onAutoForward": "ignore"
},
"10271": {
"label": "DocumentDB Site B \u2014 do not forward",
"onAutoForward": "ignore"
}
},
"onCreateCommand": "npm ci --ignore-scripts --no-audit --no-fund",
Expand All @@ -27,5 +35,8 @@
"ms-azuretools.vscode-documentdb"
]
}
},
"otherPortsAttributes": {
"onAutoForward": "ignore"
}
}
11 changes: 11 additions & 0 deletions .devcontainer/organizer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
"label": "Organizer development planner",
"onAutoForward": "notify",
"visibility": "private"
},
"10270": {
"label": "DocumentDB Site A \u2014 do not forward",
"onAutoForward": "ignore"
},
"10271": {
"label": "DocumentDB Site B \u2014 do not forward",
"onAutoForward": "ignore"
}
},
"onCreateCommand": "npm ci --ignore-scripts --no-audit --no-fund",
Expand All @@ -31,5 +39,8 @@
"ms-azuretools.vscode-documentdb"
]
}
},
"otherPortsAttributes": {
"onAutoForward": "ignore"
}
}
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ node_modules
coverage
playwright-report
test-results

# Secret-bearing local extension handoff; never build, commit, or share.
.workshop-private/
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ WORKSHOP_MODE=starter
WORKSHOP_LOCATION=laptop
WORKSHOP_PUBLIC_HOST=
WORKSHOP_PORT=3000
# Host/outer-dev-container loopback ports for the VS Code extension, not app DNS.
# If occupied, choose two distinct unused ports; never stop someone else's services.
SITE_A_EXTENSION_PORT=10270
SITE_B_EXTENSION_PORT=10271
# The attendee Compose file always starts at local (Site A).
# ACTIVE_TARGET is used only by the explicit presenter override.
ACTIVE_TARGET=local
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
- run: npm run test:docs
- name: Start and seed only the two self-hosted sites
run: npm run workspace:start
- name: Verify remote-extension loopback endpoints and independent authentication
run: npm run extension:check
- name: Exercise two independent database servers
run: docker compose -f compose.yaml exec -T app npm run test:database
- name: Verify complete-reference recovery
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ playwright-report/
test-results/
.DS_Store
Thumbs.db

# Secret-bearing local extension handoff; never build, commit, or share.
.workshop-private/
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ On the preceding main source, a fresh **two-core attendee Codespace** reached bo
sites in **4m47s**, actual Site A/B checks passed **34/34 plus integration**, Google
Calendar imported **3/3 events**, and a real **local Mac mini → managed Azure**
round trip passed (temporary cloud resource cleaned up). See the
[acceptance record](docs/acceptance.md) for scope. **This reconnect/onboarding
revision also passed a restarted-Codespace attendee run: 47/47 tests, actual
browser exercises, and cold first-connection recovery in the same app process.**
[acceptance record](docs/acceptance.md) for scope. **The preceding reconnect/onboarding revision also passed a restarted-Codespace
attendee run: 47/47 tests, actual browser exercises, and cold first-connection
recovery in the same app process. This extension-integrated revision still needs
a fresh Codespace and actual extension GUI acceptance; those earlier counts do
not prove it.**
Timed human classroom delivery and conference-laptop networking are
not verified; automated checks are not substitutes.

Expand All @@ -43,16 +45,31 @@ cross-listings, unresolved disagreements, and the excluded invalid break time.
3. When the terminal says **Site A and Site B are ready and both catalogs are
seeded**, select **Ports** beside Terminal in the editor's bottom panel. Find
row **3000** and use **Open in Browser** (globe). Keep visibility **Private**.
4. Follow the [attendee guide](docs/lab.md), also linked persistently in the planner.
4. Run `npm run extension:connections`, then follow the
[private connection steps](docs/extension.md#connect-the-two-existing-sites-privately)
to save **Workshop — Site A** and **Workshop — Site B** in the DocumentDB
extension's **Connections** tree. No Azure sign-in or **Set Up Local** wizard.
The helper never prints credentials; keep its generated file private.
5. Follow the [attendee guide](docs/lab.md), also linked persistently in the planner.
The blue **Exercise 1** checkpoint is intentional, not a broken database.
5. Edit in Codespaces: **Explorer → exercises → starter → repository.js**, or
6. Edit in Codespaces: **Explorer → exercises → starter → repository.js**, or
**Ctrl/Cmd+P**, then type `exercises/starter/repository.js`. A GitHub file link
is a read-only source view, not the editable file in your running Codespace.

Both Codespaces profiles include the official
[DocumentDB for VS Code extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-documentdb)
(`ms-azuretools.vscode-documentdb`). It does not connect to or provision a database
automatically; the workshop's Compose setup still owns Site A and Site B.
(`ms-azuretools.vscode-documentdb`; guide targets version 1.0.0). Use it throughout
the lab: inspect catalog JSON before TODO 1, see favorite writes after TODO 2,
compare sites around the **app's** selected copy, and observe index/migration
changes. The extension does not implement your driver code or copy favorites
automatically. Compose still owns both containers; saved connections do not
turn them into extension-managed Local instances.

Only the app's **3000** port is privately forwarded. Database ports **10270/10271**
are bound to outer-container loopback for the remote extension and ignored by
auto-forwarding; never forward them or make them public. Both host ports are
configurable without touching credentials/volumes. See the
[networking explanation and CLI fallback](docs/extension.md).

Every workshop terminal command runs **inside Codespaces**, unless explicitly
following the optional [laptop-local appendix](docs/local.md).
Expand Down
5 changes: 5 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ services:
environment:
USERNAME: ${DOCUMENTDB_USERNAME:?Run the setup command first}
PASSWORD: ${DOCUMENTDB_PASSWORD:?Run the setup command first}
# Reachable by the remote VS Code extension in the outer dev container only.
ports:
- "127.0.0.1:${SITE_A_EXTENSION_PORT:-10270}:10260"
volumes:
- documentdb-data:/data
stop_grace_period: 30s
Expand All @@ -13,6 +16,8 @@ services:
environment:
USERNAME: ${SITE_B_USERNAME:?Run the setup command first}
PASSWORD: ${SITE_B_PASSWORD:?Run the setup command first}
ports:
- "127.0.0.1:${SITE_B_EXTENSION_PORT:-10271}:10260"
volumes:
- documentdb-site-b-data:/data
stop_grace_period: 30s
Expand Down
73 changes: 72 additions & 1 deletion docs/acceptance.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,74 @@
# Acceptance record and remaining gates

## Extension-integrated revision — pending live GUI acceptance

Implementation verification recorded October 18, 2026, based on canonical main
`56e769c026cc709b857f28fc45bb3048dc53b675`. This revision integrates the official
DocumentDB for VS Code **1.0.0** explorer into the existing 105-minute developer
lab. The older counts and screenshots below **do not prove this extension path**.

Executed locally on macOS with Node 24:

- `npm ci --ignore-scripts --no-audit --no-fund` completed.
- Offline suite: **58 tests, 57 passed, one existing Linux-only organizer-file
test skipped**. New checks cover `.env` literal/quoted parsing, safe rejection
of duplicates/interpolation/partial credentials, credential-free URI handoff,
private file ownership/permissions and atomic repeatability, unchanged `.env`,
no cloud export, no secrets in console output, loopback/forwarding policy,
reconnect-project port isolation, and bounded read-only playground contracts.
- Local Markdown links checked; no network requests in the docs check. Public
extension docs/source were separately read to verify the connection wizard,
local TLS choice, Collection View/Indexes controls and **prebound** playground
model. This is source review, not an executed GUI result.
- No Docker stack, existing attendee Codespace, cloud resource, database notebook,
or shared extension storage was changed by this implementation check.

**Required live checks still pending for this revision:**

1. Create a **fresh** attendee Codespace from the final merged source. Record
cold-start timing, extension version/remote host and actual resource needs.
Verify only app port **3000 / Private** is forwarded, not database ports
**10270/10271** or custom database ports. Inspect actual loopback bindings.
2. Run `npm run extension:connections`; check ignored private directory `700`
and file `600`, unchanged `.env`, and no secrets in terminal output. Run
`npm run extension:check` from the outer container: both authenticated local
reads and cross-site credential rejection must pass. This is only endpoint
proof, not the next GUI checkpoint.
3. In the actual extension GUI, use **New Connection → Connection String**, the
credential-free URI, local **Allow invalid certificates** choice (TLS stays
on), and **Username and Password** prompts. Save/rename both **Workshop —
Site A** and **Workshop — Site B**. Show **both saved Connections tree nodes**
expanded to the actual database and `sessions`/`workshop_meta`. No Azure login
or third local instance. Do not require Compose containers to appear as
extension-managed Local instances. Close private files before screenshots.
4. Browse Site A session JSON before TODO 1; show `_id`, `startsAt` and the real
`catalogVersion`. Complete both TODOs in the editor, save favorites in the app,
then show actual favorite `_id`/`savedAt` in the extension. Restart persistence
and the existing browser checkpoints must still work.
5. Compare A/B favorite views before and after the **app's selected copy**. Retry
that direction and verify one destination document with unchanged destination
`savedAt`, then copy a new favorite back. No extension **Copy Collection**.
6. Create the index via CLI and inspect actual `{ startsAt: 1, _id: 1 }` keys in
the extension's **Indexes** tab. Observe the **same session `_id`** before/after
CLI migration, version 1/no attendanceMode → version 2/in-person, with unchanged
favorite timestamp. Rerun migration: zero changed. Never reset an old notebook
to manufacture a before state.
7. Optional prebound `.documentdb.js` templates: actual CodeLens Run from the
selected database, at most five sample sessions, and **17 groups / 74 Monday
entries** for the aggregation. Test a custom database name by creating a new
playground from that database node, not editing a hidden connection setting.
8. Re-run real two-server integration, isolated reconnect/interruption regression
and calendar download on this source. The reconnect override must publish **no
database ports**, avoiding collisions with the main attendee stack or parallel
harnesses. Existing first-connection recovery must retain the same app process.

CI now includes the read-only host-side `extension:check` after startup, alongside
existing database integration and reconnect jobs. Added CI steps are not claimed
as executed here. If a GUI checkpoint is blocked, record the blocker and use
`inspect` to continue the lab; **do not mark the extension accepted from CLI-only
or offline tests**. Presenter Azure extension use remains optional and requires
separate approved access with fully validated TLS; no attendee subscription.

## Executed evidence before the reconnect / attendee-polish revision

Recorded October 17, 2026 against the preceding main source
Expand Down Expand Up @@ -127,7 +196,9 @@ npm run test:reconnect

Requires Docker Compose **2.24.4+** for its port override. It creates a fresh random
`ato-reconnect-*` project, private temporary `.env`, independent volumes and a
random **loopback-only** app port. It ignores ambient workshop credentials and
random **loopback-only** app port. The override removes both database port
mappings, so parallel harness projects never reserve the attendee extension
ports. It ignores ambient workshop credentials and
never adopts an existing project. It stops/starts only its Site B, captures
sanitized pass/fail receipts, and removes **only its own ephemeral project and
volumes** through a single idempotent cleanup path. **SIGINT / SIGTERM** abort
Expand Down
Loading
Loading