What changed since the first draft
Inder shipped a run of hardening changes between 24 and 27 September. Everything below is checked against Clerq’s main at f522f98b and the official GitHub and Claude docs.
Fixed since 24 Sep
- Deploys wait for green tests on main25 Sep
- Only the owner can start deploys and runbooks by hand,
@claudeincluded25–26 Sep - Infra applies only in a second run that names a reviewed plan24 Sep
- A code-owners file names the owner on every path25 Sep
- Dependabot raises dependency updates weekly25 Sep
- A staging site exists at
staging.clerq.nz27 Sep; HTTPS not switched on yet
Still open
- The old control-plane deploy role still trusts every git tag
- No environment is confirmed locked to main
- The Cloudflare and Claude tokens are still repo-level secrets
- No smoke check, rollback or health alarm after a deploy
New in this check
- The production deploy role now also trusts the staging environment, and it can roll any service
- The repo lives on a personal account, so collaborators always get write access and GitHub can’t limit who merges
- Every owner-only guard trusts one login,
Trailblazerai-nz, which is shared - The deploy gate should also require a push from this repo, not only a branch named main
- Playwright’s browser downloads aren’t on Claude’s default sandbox allowlist, so end-to-end tests stay in CI
Roads into production
On a personal GitHub account, anyone given access can push a branch that carries its own workflow file, and GitHub can’t stop that. So the roles and secrets themselves must only answer to main. Switch to “After the fixes” to see what changes.
main, then the tests pass again on mainThe stages a tester’s bug goes through
Compare how a bug the tester finds gets fixed today with how it would move through the plan. Press play, then flip the smoke check to “Fails” to see what happens when a deploy goes wrong in each case.
-
1
Ticket
CLQ-123The tester files the bug in Jira.
Tester -
2
Inder fixes it
his Claude sessionHe reproduces and fixes it himself.
Inder -
3
PR checks
claude/… branchTests and the end-to-end run on the pull request.
GitHub Actions -
4
Merge
own PRInder merges his own pull request.
Inder -
5
Tests on main
webapp-ciThe deploy waits for them to pass.
GitHub Actions -
6
LiveLive, broken
migrate → roll → stableIt works, but nobody is told either way.
No smoke check, rollback or alarm. Broken until someone notices.
Automatic
-
1
Ticket
CLQ-123Filed with steps on the demo org.
Tester -
2
Claude session
cloud sandboxFailing test first, then the fix and the Python tests.
Tester and Claude -
3
PR checks
claude/clq-123-…Tests, end-to-end run, and Claude’s review on request.
GitHub Actions -
4
Staging preview
staging.clerq.nzThe tester re-checks the bug on fresh synthetic data.
Inder deploys, tester checks -
5
Inder’s checkpoint
review + approveNothing merges to main without his approval.
Inder -
6
Deploy
tests → migrate → roll → smokeStarts only after the tests pass on main.
Automatic -
7
LiveRolled back
message to Inderalert to InderA message names the PR; the ticket moves to Done.
Back to the last good version; Inder is alerted.
Automatic
Staging (staging.clerq.nz) runs the web app only, on fresh synthetic data, and is off outside 07:00–21:00 on weekdays. It has no workers or cloud AI, and email, texts and payments fail closed, so bugs in those areas can’t be checked there. Today only Inder can deploy to it, and a US$360 a month budget alert watches its cost.
Access levels
Who can do what, and what actually enforces it. GitHub and AWS do the enforcing, so the limits hold even if a laptop, a session or a password goes wrong.
The repo lives on a personal account, not an organization
Trailblazerai-nz is a personal GitHub account (“Trail Blazer Labs”), and it’s a shared login. On a personal account every collaborator gets write access, there are no read-only roles, and GitHub can’t restrict who presses merge. GitHub can convert the account into an organization with Inder as owner. The repo keeps its address, so the AWS trust rules keep working, and the owner-only guards switch to Inder’s own login.
People
| Can they… | Inder | Tester | Tester’s Claude session | What enforces it |
|---|---|---|---|---|
| Read the code | Yes | Yes | Yes | Collaborator access |
| Push branches, open pull requests | Yes | Yes | Its own session branch only | Claude’s git proxy only allows the session’s branch |
| Merge to main (which deploys) | Yes | Only after Inder approves | No | Protected main with required approval (needs GitHub Pro on a personal account). “Only Inder presses merge” needs an organization. |
| Start deploys and runbooks by hand | Yes | No | No | Owner-only guards in the official workflow files (25–26 Sep). A branch’s own workflow is covered by locking the environments. |
| Deploy a branch to staging | Yes | No, Inder does it | No | Owner-only staging workflow. A staging-only role would let the tester do it safely. |
| Create tags, or change workflow files on a branch | Yes | Yes, can’t be blocked on a personal account | No workflow edits | Made harmless: the tag role goes, and roles and secrets answer to main only |
| AWS access | Yes, from his Mac | No | No | No credentials issued to him |
| Production data and secrets | Yes | No | No | Nothing shared; secrets move into main-only environments |
On each system
GitHub
- Owner
Trailblazerai-nz, a shared login- Tester
- Collaborator, which always means write access here
Claude
- Inder
- Owner: org settings, PR review, shared environments
- Tester
- Member with his own seat
Jira
- Tester
- Normal project user
- Claude
- Inherits the tester’s own Jira permissions
AWS
- Tester
- No access of any kind
- Claude
- No access; its sandbox has no AWS credentials
Machine identities
- Production deploy rolenz-auckland-1-ci-deployTodayTrusts
main, the production environment and, since 27 Sep, the staging environment. Can roll any service.FixLock both environments to main. Give staging its own role that can only touch the staging service. - Infra rolenz-auckland-1-ci-infraTodayPowerUser. Its workflows are owner-only and apply needs a reviewed plan, but its environments aren’t confirmed locked to main.FixLock infra-plan, infra-apply and ops to main. Give planning a read-only role.
- Old control-plane roleclerq-ci-deployTodayTrusts every git tag. Can push images and roll services. Nothing in the repo uses it.FixDelete it, from the Mac (the control-plane state lives there).
Code areas: which bugs the tester may fix
Tester fixes
- Screens and layout
- Wording
- Form validation
- Frontend behaviour
Tester fixes, Inder looks harder
- Backend logic away from data and security
- API responses and error messages
- Scheduled jobs that don’t touch client data
Inder only
- Infrastructure, CI and workflows
- Database migrations
- The anonymiser and the compliance gates
- Tenancy, sign-in and billing
The code-owners file already flags CI, infra, migrations, brain/ and security/. Add the anonymiser, the gates, tenancy, sign-in and billing to it, and have CI label any tester pull request that touches them.
Why those areas are off limits
Clerq fails closed on purpose. Many things a tester files as bugs are safety features doing their job: the quarantine holding a message, a gate refusing a draft, a screen showing no rows when no firm is selected. Ask Claude to “fix” one and it will, and the fix becomes a privacy hole.
What the tester is set up with
- His own GitHub account with 2FA, never the shared login
- His own Claude seat on a Team plan
- A shared Claude cloud environment where the Python tests run; end-to-end tests run in CI
- Jira wired in: Claude reads the ticket, and pull requests show on it
- A
CLAUDE.mdin the repo that tells Claude the rules - Staging previews of his branches, deployed by Inder for now
Claude’s own settings are seatbelts, not locks. Anthropic’s docs call them “a client-side control, not a security boundary”, and organisation-wide settings would also bind Inder. Keep them light.
When something breaks
Deploys now wait for green tests, which stops broken code from shipping. Nothing yet notices when a deploy that passed the tests breaks the live app.
Today
- The only alerts: an hourly smoke-test email to Inder’s Gmail, GitHub’s failed-run emails, and a cost alert for staging
- No health alarms. The Terraform says “no CloudWatch alarms” itself.
- The deploy ends at “service is stable”, which doesn’t mean it works
- Nothing rolls back on its own
After
- A smoke check after every deploy, with automatic rollback if it fails
- Automatic rollback when a new version won’t start
- Six alarms to email, SMS or Slack server errorsunhealthy serversslow responsescrashed tasksstuck queue messagesdatabase at its limit
- A message after every deploy that names the pull request
- Migrations only add things: code can roll back, a schema change can’t
Where I’d push back
Review work lands on Inder
He already merges about 65 pull requests a week. The tester saves him finding, reproducing and checking bugs, not reviewing them. Measure it after 2–3 weeks.
Can the tester read code?
If not, Inder is the only real reviewer. Start him on screen, wording and validation bugs.
No client data in Jira
Claude reads the ticket and sends it to Anthropic. A real client name or screenshot breaks the rule Clerq is built on. Demo org and staging data only.
Test on staging, not the live system
On the live system Stripe is in live mode and email really sends. Staging fails closed for both, but it can’t test workers, AI or real sends, so those bugs stay with Inder.
Claude’s automatic PR review is priced per review
US$15–25 each. Switched on for every pull request, it would also review Inder’s, about US$4,200–7,000 a month. Run it on request, on the tester’s pull requests only. See the numbers.
What it costs
Automatic PR review, per month
The difference between reviewing the tester’s pull requests and reviewing every one.
Show as a table
| Scenario | Pull requests a week | Reviews a month | Cost a month |
|---|---|---|---|
| Tester’s only (example) | 10 | 43 | US$650–1,080 |
| Every pull request | ≈65 | 281 | US$4,200–7,000 |
In this order
-
1
Close the side roads
half a dayDelete the tag-trusting role, lock the five environments to main, move the secrets into them, protect main.
Owner-only guards and code owners done -
2
Give everyone their own login
an hour, done carefullyConvert
Trailblazerai-nzinto an organization with Inder as owner, then point the owner-only guards at his own login. -
3
Onboard the tester
2–3 hoursAccounts, Claude seat, a shared cloud environment,
CLAUDE.md, a pull request template, the Jira apps. -
4
Alarms and rollback
about a daySmoke check and rollback in the deploy, automatic rollback on a failed start, six alarms, deploy messages.
-
5
Staging for the tester
after HTTPS is onGive staging its own deploy role so the tester can preview his own branches without touching production.
There’s no safe shortcut before step 1. On a personal account any repo access is write access, and @claude now answers only the owner. Keep the tester filing tickets until the side roads are closed.
Questions for Inder
- Are the five environments locked to main? That decides whether two of the side roads are already closed.
- Who can sign in as
Trailblazerai-nz? Every owner-only guard trusts that login. - Move Clerq into an organization? It’s the only way to get read-only access and “only Inder merges”.
- How comfortable is the tester reading code? It decides which bugs he starts with.