ci: dev-bootstrap smoke job + centralized dev-server docs#738
Merged
Conversation
Adds a `dev-smoke` CI job that verifies the documented developer bootstrap end to end on a clean checkout: `source env.sh` → `gz_start` → sign in via the mock-IdP dev login flow → assert `/api/pieces/` returns seeded data → `gz_stop` (and asserts the servers actually stopped). Wired into `record-fingerprint` so the skip-main optimization requires it too. No dependency-install step — bazel provides web `node_modules` via the gz_start launcher build. Centralizes the dev-server bootstrap + login knowledge that was previously buried in /report (and whose redirect_uri example was the wrong absolute form): - dev-environment skill: new "Authenticating Against the Local Dev Server" section (correct relative-redirect_uri two-step curl flow, auto-seeded pieces, DEV_BOOTSTRAP_ENABLED guard); "Production Backup & Local Repro" section for gz_backup/gz_restore; corrected "agents source env-agent.sh, never env.sh" rule; frontmatter description updated for recall. - report-bug skill: §3d now points at the canonical flow instead of duplicating it. - dev-packages skill: new npm packages must be added to BOTH the dev/build (web_lib, component *_src) and production (web_prod_lib) lib targets by default — the react-easy-crop two-commit footgun. - docs/agents/dev.md: gz_* helper reference table, backup/restore subsection, env-agent.sh-not-env.sh correction. - AGENTS.md: bootstrapping index row mentions dev login, running servers, prod backup/restore. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…docstring The dev-smoke step used `set -euo pipefail`; the -u (nounset) aborted on `source env.sh` because env-agent.sh reads $_GLAZE_AGENT_ENV_LOADED before it is set (line 35). Existing lint/coverage jobs source env.sh without -u. Use `set -eo pipefail` (the Actions bash wrapper already applies -e and pipefail). Also corrects the mock_idp_views.py module docstring: redirect_uri must be the relative /api/auth/mock-idp/complete/ (absolute is 400'd), and BASE must be prefixed on the complete/ GET since the returned Location is relative. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`gz_status | grep -q "running"` also matched "backend: not running", so the post-stop assertion fired even when gz_stop succeeded. Match `: running` to catch only the affirmative running state. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
main's report-bug fix told the agent to `source env.sh` to start the server, which contradicts the rule this PR establishes (agents source env-agent.sh, never env.sh — env.sh unsets GLAZE_AGENT). Switch §3c to source env-agent.sh from the worktree, preserving the GLAZE_ROOT-from-worktree guidance. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cb12b99 to
96dd6b7
Compare
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.
Summary
Adds a CI smoke job that verifies the developer bootstrap works end to end, and centralizes the dev-server setup/login knowledge it relies on (previously buried in
/report).CI:
dev-smokejobOn a clean checkout, runs the documented flow and fails if any step breaks:
source env.sh→gz_start(brings up the dev stack; bazel provides webnode_modules, so no install step)redirect_uri, two-step curl)/api/auth/me/is authenticated and/api/pieces/returns seeded pieces (first login seeds ~75)gz_stop, then assert both servers actually stoppedThe whole sequence runs in one shell because
gz_startregisters anEXITtrap that also cleans up on failure. Wired intorecord-fingerprintso the skip-main optimization requires it. Uses only the whitelistedBAZEL_REMOTE_API_KEYsecret (passes the in-workflow security audit). Validated locally: the exact sequence logs in, returns pieces, and stops cleanly.Docs: centralize dev-server bootstrap + login
The dev login flow lived only in
/report§3, and itsredirect_uriexample was the wrong absolute form (the view requires the relative path and 400s otherwise). Now documented once and referenced:dev-environmentskill — new "Authenticating Against the Local Dev Server (dev login)" section (correct flow, auto-seeded pieces,DEV_BOOTSTRAP_ENABLEDguard); "Production Backup & Local Repro From a Prod Snapshot" section (gz_backup/gz_restore); the "agents sourceenv-agent.sh, neverenv.sh" rule; frontmatterdescriptionupdated for recall.report-bugskill — §3d points at the canonical flow instead of duplicating it.dev-packagesskill — new npm packages must be added to both the dev/build (web_lib, component*_src) and production (web_prod_lib) lib targets by default (thereact-easy-croptwo-commit footgun).docs/agents/dev.md—gz_*helper reference table, backup/restore subsection,env-agent.sh-not-env.shcorrection.AGENTS.md— bootstrapping index row now mentions dev login, running servers, and prod backup/restore.Notes
pull_prod_pieces.pyAPI-scraping approach (deleted) in favor of the sanctionedgz_backup→gz_restorepath.🤖 Generated with Claude Code