fix(web): align story creation permission and verify workspace lifecycle - #343
Open
shuntianyifang wants to merge 4 commits into
Open
fix(web): align story creation permission and verify workspace lifecycle#343shuntianyifang wants to merge 4 commits into
shuntianyifang wants to merge 4 commits into
Conversation
shuntianyifang
marked this pull request as ready for review
September 9, 2026 10:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Stories page checks the retired
runs:executepermission before offering story creation, while the workspace API requiresworkspaces:execute. A role with workspace execution permission can create a story through the API but cannot start one from the page; a role with only the old permission is offered an action the API rejects.This change aligns the page with the API and adds browser regression coverage for the persistent workspace lifecycle. Refs #284; this is a bounded UI acceptance contribution, not completion of the release-readiness issue.
Changes
workspaces:executewhen rendering story creation, with six permission regression cases covering the exact permission, wildcards, read-only permissions, and the retired permission.FakeWorkspaceRuntime. It verifies the same workspace and untracked file/Claude/Codex session-marker contents survive lifecycle operations, then verifies confirmed deletion removes the files while retaining conversation history.pnpm verify; document the setup and fixture boundaries. Keep Playwright files outside Vitest discovery.Latest acceptance
Merged main
c14bc6d; the PR head is nowdaa177de4b6a919cc2e6e05818311d7f4ee5bb85. Ubuntu acceptance run 34309420909 explicitly checks out that exact source tree, without the auxiliary validation workflow in the tested checkout.pnpm verifypassed its lint, type checks, clean builds, critical integration suites, remaining tests, unused checks and guards, but failed the final dependency audit: 18 findings, including 2 critical and 6 high (2 already ignored by repository policy). No exclusions were added. The affected existing versions, including Next.js 16.2.11, are unchanged by this PR. The full verify job is not green.FACILITY_PREVIEW_URL=https://preview.example.test: migrations exit 0, API readiness, login page, unauthenticated/v1/merejection, and API/Web restart recovery. Disposable containers and volumes were removed afterward. This does not validate external TLS or preview traffic.Remaining blockers and boundaries
Scope and compatibility
This is a user-visible permission-alignment fix, classified as
fix(web)(patch, no breaking change). Server-side authorization is unchanged. No migrations, persistence format, budget/cost enforcement or production observability behavior changes.External catalog/manifest reads and execution use deterministic fakes; tests need no live credentials or network after dependencies and Chromium are installed. The real-API fixture binds to loopback and refuses databases other than local
facility_test/facility_ws.Checked existing PRs on 2026-09-08: #332 covers axe checks on rendered fragments, #337/#339 cover accessibility semantics, and #324 covers Docker wake readiness. Those do not supply this lifecycle browser suite or the story-creation permission fix.