Skip to content

Commit c4ee255

Browse files
Doc drift: workspace_swap fallback prompt removed; YES gate; recovery pass (#36)
PR #34 made .env mandatory for swap-to-feature, removed the interactive prompt fallback, removed the value-set-priority shortcut, and added a case-sensitive YES confirmation. PR #35 moved that confirmation into the chat UI for slash-command invocations. fabric-development-process.md still described the old behavior in three spots. Updates: - Step 4 (swap-to-feature): drop the 'or prompts if .env is missing' claim; add the YES confirmation step; add the recovery pass step. - Local .env Setup section: replace 'falls back to interactive prompt' + 'value set is source of truth' with the new model (.env always authoritative for swap-to-feature; value set used by swap-to-dev and the recovery pass; YES confirmation gate). - Copilot Chat section: note that /swap-to-feature moves the YES confirmation into the chat UI. Tests: 185 pass (no script changes).
1 parent fcd600c commit c4ee255

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

fabric-development-process.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,13 @@ A Python script at `scripts/workspace_swap.py` handles the full lifecycle of fea
9393
The script automatically:
9494
- Detects the current branch name (no arguments needed).
9595
- Reads dev IDs from `variables.json` (the default value set).
96-
- Reads feature workspace/lakehouse IDs from `.env` (or prompts if `.env` is missing).
96+
- Reads feature workspace/lakehouse IDs from `.env`. If `.env` is missing or has empty/missing keys, the script exits with an error pointing at `.env.sample` — there is no interactive fallback.
97+
- Displays the planned swap and asks `Type YES (uppercase) to apply, anything else to abort.` Type `YES` (case-sensitive) to proceed; the run is dry only when `--dry-run` is also passed.
9798
- Creates a feature branch value set (e.g., `valueSets/<branch-name>.json`).
9899
- Adds the value set to `settings.json`.
99100
- Rewrites the semantic model Direct Lake connection in `expressions.tmdl`.
100101
- Rewrites notebook META dependency blocks in all `notebook-content.py` files.
102+
- Sweeps stale feature IDs from a previous swap if `.env` was changed since the last run (recovery pass).
101103
- Validates no dev IDs remain in critical files.
102104
5. **Commit and push** the changes to the feature branch:
103105
```
@@ -155,7 +157,7 @@ The repo ships slash commands in `.github/prompts/` that wrap the CLI. In Copilo
155157
- `/swap-to-dev-dryrun` — preview the revert without writing files
156158
- `/check-pr-ready` — run the CI-style readiness check locally
157159

158-
Copilot will execute the script in the VS Code integrated terminal and show you the output. This is useful when you are already working in Copilot Chat and want to stay in the same workflow without switching to the terminal.
160+
Copilot will execute the script in the VS Code integrated terminal and show you the output. The `/swap-to-feature` slash command moves the `YES` confirmation into the chat UI — you click `YES` or `NO` in chat and Copilot pipes the answer to the script so the terminal never blocks. This is useful when you are already working in Copilot Chat and want to stay in the same workflow without switching to the terminal.
159161

160162
Note: Copilot cannot auto-trigger the script on branch checkout. You still need to invoke a slash command or run it yourself after pulling a feature branch.
161163

@@ -170,7 +172,9 @@ Note: Copilot cannot auto-trigger the script on branch checkout. You still need
170172
3. Paste both into `.env`.
171173
4. Run `python scripts/workspace_swap.py` (or `/swap-to-feature` in Copilot Chat).
172174

173-
If `.env` is missing or empty, the script falls back to an interactive prompt. After the first run, the value set on disk is the source of truth for that branch — `.env` is no longer consulted for it.
175+
If `.env` is missing, has empty values, or is missing either key, the script exits with a clear error pointing at `.env.sample`. There is no interactive fallback — `.env` is the single source of truth for swap-to-feature.
176+
177+
For swap-to-feature, the script always reads `.env` (the existing value-set file does not override it). The value set on disk is read by swap-to-dev (to know which feature IDs to revert) and by the recovery pass (to detect previously-applied stale IDs that need rewriting). Before any rewrite happens, the script displays the planned dev → feature change and waits for the user to type literal `YES` to confirm.
174178

175179
The script intentionally does **not** auto-discover IDs via the Fabric REST API. An earlier implementation matched workspaces by display name, which could silently pick the wrong workspace (e.g. matching the dev workspace itself), causing the swap to abort with no value set written. Explicit `.env` config avoids that class of bug.
176180

0 commit comments

Comments
 (0)