Skip to content

Deploy production on release-* tags - #81

Merged
aterga merged 8 commits into
mainfrom
claude/mcp-production-deployment-d74205
Jul 28, 2026
Merged

aterga merged 8 commits into
mainfrom
claude/mcp-production-deployment-d74205

Conversation

@aterga

@aterga aterga commented Jul 27, 2026 •

Copy link
Copy Markdown
Collaborator

Was stacked on #84, which is now merged. Rebased onto main (which also carries #86 and #88) and retargeted by hand — the auto-retarget originally promised here only fires when the base branch is deleted on merge, and claude/staging-onprem-runner-d74205 was kept. The diff is the release workflow plus its documentation.

Note, 2026-07-29. Internal network addresses and the runner group name have been removed from the "Production public path" section below ahead of this repository going public (#101). AWS resource identifiers and all reasoning are intentionally kept — they are opaque without credentials in the account, and the reasoning is the point. Also: SSH is no longer reachable from the internet on either host; see #91.

Summary

Adds a second deployment target driven by release tags. Pushing a release-* tag rolls that exact commit out to the production host, and nothing else moves it, so the live revision is always a named point in history rather than whatever last landed on main. Rolling back is re-running the workflow with an earlier tag as the ref input — no revert commit and no new tag.

It reuses the deploy mechanics staging already runs on, so production inherits the build/ship split, the architecture guard and the post-deploy commit assertion without duplicating any of it. Production ships from the same pool staging does, for the same reason: the host's IPv4 is RFC1918 and no GitHub-hosted runner can route to it.

Split from #84 deliberately, one variable per merge: #84 proved the ship path on staging, and this adds production now that the path is known good.

The ship path is proven. A main deploy shipped to the staging host and passed the /version assertion from a dind-small pod. That settled the two questions this PR was waiting on: the pods can reach a host on its RFC1918 address, and a runner inside the VPC is not needed.

Related issues

None. Related work split out rather than folded in here:

Changes

  • Add deploy-release.yml: release-* tag → production, with a workflow_dispatch ref input for rollback and a deploy-production concurrency group.
  • Add a validate-ref job so a manual dispatch can only name something immutable — a release-* tag (bare or refs/tags/-qualified) or a full 40-character commit SHA. Branches and abbreviated SHAs are rejected, because deploying one would break the reproducibility this workflow exists to provide. It runs on workflow_dispatch only; the tag trigger already constrains the push path.
  • validate-ref emits the accepted ref in normalized form and deploy consumes that output rather than the raw input. Validating the text while checking out inputs.ref anyway would only have made the input look acceptable: a bare release-X names a tag and a branch equally well, so a branch of that name could have reached production having passed validation.
  • Vet the whole dispatch input against a single-line refname character class before inspecting its shape, then run git check-ref-format on the qualified tag. Both are load-bearing rather than defensive: the input is free text that the REST API accepts newlines in, so an unvetted value injected extra key=value lines into $GITHUB_OUTPUT where a second ref= line wins — deploying a branch while the run's inputs still displayed the tag. check-ref-format separately rejects release-../../heads/main, which passes any plausible character class and can path-normalize to refs/heads/main.
  • Select the dind-small scale set by name for the production ship job. An earlier revision used '["self-hosted","linux","imcp-prod"]', which could never have matched: an ARC runner scale set is selected by its name alone and carries none of the default self-hosted / linux / x64 labels, so no amount of labelling a pool makes a label list resolve. The call site records that, since it is the mistake someone would otherwise repeat.
  • Refresh the ship_runs_on input description and the README's guidance for the same reason — both taught the label-list form as the way to select a self-hosted runner.
  • Drop the "reachability UNCONFIRMED" note from staging's caller; accurate when written, not now.
  • Restore the deploy-release.yml references in the deploy.yml and deploy-native.yml headers. Ship staging from the on-prem runner over its private address #84 removed them so they would not dangle on a branch that does not add the file; this branch does, so they resolve here.
  • Correct the environment-secrets guidance in both the README and the deploy-release.yml header — the previous wording was wrong in a way that hid a precedence trap (see below).

Testing

  • All three workflows parse as YAML; both callers' ship_runs_on parses as JSON to the bare string dind-small, the same single-value shape build_runs_on already uses.
  • validate-ref exercised end to end, asserting what deploy would check out rather than only accept/reject: the $GITHUB_OUTPUT injection payload, release-../../heads/main, release-x.lock, release-a@{0}, release-a b, release-, refs/heads/release-…, main, refs/heads/main, v1.2.3, an abbreviated SHA and an empty string are all refused; bare and refs/tags/-qualified release-* tags both normalize to refs/tags/release-*; upper- and lower-case 40-char SHAs pass through unchanged.
  • The mechanics are exercised on staging, including the dind-small selector, SSH to a private address, and the post-deploy /version assertion.
  • This workflow cannot be exercised before merge — it triggers only on a release-* tag, and the repository has none.
  • Not run: cargo build / cargo test / clippy — no Rust source changed.
  • Not run: npm test --prefix monitoring/mcp-status — no dashboard code changed; the workflow runs it anyway.

Checklist

  • I have read the Contributing guidelines.
  • Docs (README / comments) updated for any user-visible change.
  • No secrets, credentials, or internal-only information are included.

Required before a release tag will deploy

Merging is safe at any point — nothing deploys until a release-* tag exists. This gates the tag, not the merge.

PROD_DEPLOY_* secrets (SSH_KEY, HOST, DOMAIN, ACME_EMAIL, optionally KNOWN_HOSTS), set at repository level. A job that calls a reusable workflow with uses: cannot declare an environment:, so ${{ secrets.* }} in the caller resolves only repository and organization secrets — an environment-scoped secret referenced there arrives empty.

The subtlety worth knowing: environment secrets are not unusable, and the name that can hijack these is the inner one. ship reads secrets.DEPLOY_SSH_KEY and it sets environment:, so a secret named DEPLOY_SSH_KEY on the staging or production environment overrides whatever the caller passed, in both pipelines. Defining PROD_DEPLOY_SSH_KEY on an environment, by contrast, does nothing at all. Keep both environments free of DEPLOY_*-named secrets and use them for protection rules only.

PROD_DEPLOY_HOST must be the host's private address, not the public FQDN — see #102 for why, and #84 for what went wrong when staging got that wrong.

Production public path — resolved

Recorded here because the arrangement is not obvious from the repo, and because the failure mode was silent.

The production host sits in a subnet whose route table sends 0.0.0.0/0 to a NAT gateway. Its auto-assigned public IPv4 could therefore never receive traffic: the SYN arrives via the internet gateway and the reply is routed to the NAT gateway and dropped. Nothing in the console flags this. The same table routes ::/0 to a real internet gateway, so the host was reachable over IPv6 the whole time — which is why the endpoint looked healthy from any v6-capable vantage point while being invisible to IPv4-only clients.

Fixed by attaching a second network interface in a public subnet (one whose route table sends 0.0.0.0/0 to an internet gateway) with an Elastic IP on it, verified reachable from an IPv4-only network. IPv4 now arrives on a different interface than IPv6 previously did; Caddy binds *:80 and *:443 so it is indifferent. DNS is now a single DNS-only A record pointing at that Elastic IP — proxying was removed because Cloudflare terminates 80 and 443, which prevents Caddy completing TLS-ALPN-01 or HTTP-01, and because its idle-connection timeout and buffering are a poor fit for the long-lived text/event-stream responses this transport depends on. Putting it back behind Cloudflare is tracked in #89.

That two-interface arrangement later turned out to matter for a second reason: because security groups attach per-interface, the public-facing one could be given a group permitting 80/443 only, which is what closed inbound SSH from the internet without touching the deploy path. See #91.

Note that a deploy reports success independently of any of this: Verify deployed version reads http://127.0.0.1:8000/version over SSH from the host, deliberately, so it proves the app is running and says nothing about public reachability. Verify with curl -4 against the public URL.


Generated by Claude Code

aterga commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

Setup needed before a release-* tag will deploy

The diff is the pipeline; these four are the configuration it depends on. None are in the repo.

1. Runner labels. deploy-release.yml currently ships from ["self-hosted","linux"]. That's a guess — replace it with labels that uniquely identify the on-prem runner. If any other self-hosted runner in the org matches those two labels, production deploys could land on the wrong machine. A dedicated label (e.g. imcp-prod) is worth adding.

2. Production secrets, repository-level.

Secret Value
PROD_DEPLOY_SSH_KEY Private SSH key for the sudo-capable user
PROD_DEPLOY_HOST user@host for the production box
PROD_DEPLOY_DOMAIN Production FQDN
PROD_DEPLOY_ACME_EMAIL ACME contact
PROD_DEPLOY_KNOWN_HOSTS (optional but recommended) ssh-keyscan <host> output

These must be repository secrets, not environment-scoped. A caller passes secrets into a reusable workflow from outside any environment context, so environment secrets resolve to empty there. Environment protection rules still work normally.

3. Check where the existing DEPLOY_* secrets live — this can break staging. deploy.yml now runs in a staging environment instead of production. If those secrets are currently scoped to the production environment rather than repo-wide, they will resolve to empty and the staging deploy will fail on the first push to main after merge. The README documents them as repository secrets, so this is probably fine, but it's worth confirming before merge rather than discovering it on a green-looking run.

Also note: if production has required reviewers today, that gate no longer applies to main pushes. That's the intent — approval belongs on production releases — but it is a real change in behaviour. Add reviewers under Settings → Environments → production to gate releases.

4. Production host reachability. The box needs an A and an AAAA record and inbound 80/443. A host with public IPv6 but only a private IPv4 will pass ACME, serve fine over v6, and be invisibly unreachable to IPv4-only clients — and /status/ won't catch it if the prober has v6. Verify from an IPv4-only network before trusting a rollout.

One caveat carried over from the PR body

The ARCH=amd64 build path is untested — there was no Docker daemon available where this was authored. The arm64 path is unchanged from what has been deploying green, and both hosts are intended to stay arm64, so this shouldn't matter in practice. But if anyone ever reaches for amd64, treat it as unproven.


Generated by Claude Code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a two-environment deployment model: auto-deploy staging from main, and deploy production only from release-* tags (with a manual rollback path via workflow_dispatch). It also hardens the native deploy scripts/workflows by parameterizing target architecture and verifying the deployed commit on-host after restart.

Changes:

  • Add a reusable native deployment workflow (deploy-native.yml) and refactor deploy.yml to call it for staging.
  • Add a production release workflow (deploy-release.yml) triggered by release-* tags (and manual ref for rollback), with build/ship split across hosted + self-hosted runners.
  • Update native deploy scripts/docs to support ARCH=arm64|amd64, derive Caddy arch from host uname -m, and verify /version reports the shipped commit.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
deploy/native/README.md Documents staging vs production deploy model, release/rollback procedure, and arch/reachability guidance.
deploy/native/deploy.sh Adds an arch guard and makes Caddy download arch match the host.
deploy/native/build.sh Adds ARCH knob and threads it through the build container platform selection.
.github/workflows/deploy.yml Switches main deploy to staging and delegates mechanics to the reusable workflow.
.github/workflows/deploy-release.yml New release-tag-driven production deploy workflow (with rollback input).
.github/workflows/deploy-native.yml New reusable workflow implementing build/ship split and post-deploy /version verification.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread deploy/native/deploy.sh Resolved
Comment thread .github/workflows/deploy-native.yml Resolved
Comment thread .github/workflows/deploy-native.yml Resolved
Comment thread .github/workflows/deploy-release.yml Resolved
@aterga
aterga force-pushed the claude/mcp-production-deployment-d74205 branch from 9bacf65 to 285cd16 Compare July 27, 2026 16:38
@aterga aterga mentioned this pull request Jul 27, 2026
4 of 7 tasks
@aterga
aterga force-pushed the claude/mcp-production-deployment-d74205 branch from 285cd16 to b2c87f9 Compare July 27, 2026 16:48
@aterga aterga changed the title Deploy production on release-* tags, staging on main Deploy production on release-* tags Jul 27, 2026
@aterga
aterga changed the base branch from main to claude/staging-onprem-runner-d74205 July 27, 2026 17:09
@aterga
aterga marked this pull request as ready for review July 27, 2026 19:17
@aterga
aterga requested a review from a team as a code owner July 27, 2026 19:17
@aterga
aterga force-pushed the claude/mcp-production-deployment-d74205 branch from b2c87f9 to bbba564 Compare July 27, 2026 19:21
@aterga
aterga force-pushed the claude/mcp-production-deployment-d74205 branch from bbba564 to cf0101e Compare July 27, 2026 19:29
@aterga
aterga changed the base branch from claude/staging-onprem-runner-d74205 to main July 27, 2026 19:34
@aterga
aterga force-pushed the claude/mcp-production-deployment-d74205 branch from cf0101e to 9393842 Compare July 27, 2026 19:34
Copilot AI review requested due to automatic review settings July 27, 2026 19:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/deploy-release.yml Resolved
Comment thread .github/workflows/deploy-release.yml Resolved
Copilot AI review requested due to automatic review settings July 27, 2026 19:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/deploy-native.yml Resolved
Comment thread .github/workflows/deploy-release.yml Resolved
@aterga
aterga force-pushed the claude/mcp-production-deployment-d74205 branch from 83866be to f05abcb Compare July 27, 2026 19:59
Copilot AI review requested due to automatic review settings July 27, 2026 19:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/deploy-release.yml Resolved
Copilot AI review requested due to automatic review settings July 27, 2026 20:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

.github/workflows/deploy-release.yml:108

  • On workflow_dispatch, a bare release-* value for inputs.ref is currently passed straight through (inputs.ref || github.ref). If someone creates a moving branch named release-*, Actions checkout can resolve the bare name to that branch rather than a tag, breaking the workflow’s “immutable refs only” guarantee.

To keep the convenience of typing release-… while ensuring it’s treated as a tag, normalize bare release-* inputs to refs/tags/... before passing into the reusable workflow.

      arch: arm64
      build_runs_on: '"ubuntu-24.04-arm"'
      ref: ${{ inputs.ref || github.ref }}
    secrets:

claude added 6 commits July 28, 2026 13:10
Adds a second deployment target driven by release tags. Pushing a `release-*`
tag rolls that exact commit out to the production host, and nothing else moves
it, so the live revision is always a named point in history rather than whatever
last landed on main. Rolling back is re-running the workflow with an earlier tag
as the `ref` input — no revert commit and no new tag.

Reuses the deploy mechanics staging already runs on, so production inherits the
build/ship split, the architecture guard and the post-deploy commit assertion
without duplicating any of it. Production ships from the same on-prem runner for
the same reason staging does: the host's IPv4 is RFC1918 and no GitHub-hosted
runner can route to it.

Production takes its own PROD_DEPLOY_* secrets rather than sharing staging's, so
a stale value can never point a production rollout at the wrong box. They have
to be repository-level: a caller resolves the secrets it passes into a reusable
workflow outside any environment context, so environment-scoped ones would
arrive empty. The environment's protection rules still apply, which is what
makes `production` a usable approval gate.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01R8ZshwKmjD5fZ4Hs9dS6zh
The note said environment-scoped secrets cannot be used at all and must be
repository-level. Only half of that holds. A job calling a reusable workflow
with `uses:` cannot declare an `environment:`, so secrets referenced in the
caller do resolve from repository/organization scope only — that part is
right. But the `ship` job inside deploy-native.yml does set `environment:`,
and GitHub resolves environment secrets for it, giving them precedence over
whatever the caller passed in.

So the guidance was not just over-broad, it hid a trap: define a secret at
both repository level and on the environment and the environment copy
silently wins inside ship, with no indication which one was used. Say that,
and keep recommending repository level as the choice the table assumes.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01R8ZshwKmjD5fZ4Hs9dS6zh
…ique runner label

The environment-secrets correction landed in the README and the PR body but
missed this file's header, which still carried the original wrong claim.
Same fix: the caller cannot use environment secrets because a `uses:` job
takes no `environment:`, but ship inside deploy-native.yml does set one, so
environment secrets resolve there and override what the caller passed.

Also narrow ship_runs_on. self-hosted and linux are applied automatically to
every Linux self-hosted runner, so the previous pair selected any of them for
a production deploy — handing an arbitrary machine the production SSH key and
reachability into that network. Requiring an imcp-prod label makes the job
queue until the intended runner carries it, which is the safe direction for
production to fail. Staging keeps the broad labels for now; it is mid-rollout
and narrowing it here would be a separate change to a live path.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01R8ZshwKmjD5fZ4Hs9dS6zh
workflow_dispatch takes `ref` as free text, so dispatching with `main` would
put whatever that branch currently points at onto production — the opposite
of the property this workflow is built around, that production only ever
moves to a named, reproducible point in history. The tag trigger enforces
that; the manual path did not.

Add a validate-ref job that accepts a release-* tag or a full 40-character
commit SHA and rejects anything else, so the rollback path still works
(including for a commit that never had a tag cut) while branches and
abbreviated SHAs are turned away with the reason.

deploy now needs that job. Because validate-ref is skipped on a tag push and
a skipped dependency would skip deploy too under the default success() gate,
deploy is gated on !failure() && !cancelled() instead — tag pushes proceed,
a rejected dispatch ref stops the deploy.

Also fix the deploy-native.yml header: it claimed the two callers differ only
in environment, runner and architecture, but the release caller also pins an
explicit ref.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01R8ZshwKmjD5fZ4Hs9dS6zh
The ref guard rejected two forms that are as immutable as the ones it
accepted. refs/tags/release-X names the identical tag as release-X, and is
the spelling github.ref uses on a tag push, so the workflow already handles
it on the trigger path while the dispatch path turned it away. An uppercase
hex SHA resolves to the same commit git-side.

Strip only the refs/tags/ prefix and match hex case-insensitively. Stripping
refs/tags/ alone is what keeps refs/heads/release-X rejected: with no
stripping applied it still does not begin with "release-". Verified, along
with refs/heads/main, refs/tags/v1.2.3, abbreviated SHAs, HEAD and empty —
all still refused.

Also spell both accepted forms out in the workflow_dispatch input
description, so the form says what it takes instead of leaving it to a
failed run.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01R8ZshwKmjD5fZ4Hs9dS6zh
Today's staging deploy settled both open questions. ARC runner scale sets are
selected by name alone and carry none of the default self-hosted/linux/x64
labels, so production's ["self-hosted","linux","imcp-prod"] could never have
matched anything — adding an imcp-prod label to a pool would not have helped.
And the pods do reach a host on its RFC1918 address: staging shipped and
passed the /version assertion from a dind-small pod in runner group dm1, so
there is no need for a runner inside the VPC.

Point production at '"dind-small"' and record why the label-list form is
wrong, since that is the mistake someone would otherwise repeat. Refresh the
ship_runs_on input description and the README's guidance for the same reason:
both taught the label-list form as the way to select a self-hosted runner.

Also drop the "UNCONFIRMED — that is what this is testing" note from staging.
It was accurate when written and is not now.

Production shipping from a shared pool puts its SSH key on multi-tenant pods.
Accepted deliberately for now, noted at the call site; a dedicated scale set
is the way to isolate it later.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01R8ZshwKmjD5fZ4Hs9dS6zh
Copilot AI review requested due to automatic review settings July 28, 2026 13:11
@aterga
aterga force-pushed the claude/mcp-production-deployment-d74205 branch from 04dc952 to 588c9ef Compare July 28, 2026 13:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

.github/workflows/deploy-release.yml:109

  • After normalizing workflow_dispatch refs in validate-ref, deploy should consume that normalized output instead of passing the raw inputs.ref. Otherwise the ambiguity (tag vs same-named branch) remains in the actual checkout/build path.
      ref: ${{ inputs.ref || github.ref }}

Comment thread .github/workflows/deploy-release.yml Resolved
validate-ref checked the input text and then deploy checked out inputs.ref
anyway, so the check only made the input look acceptable — it did not make the
checkout unambiguous. A bare release-X names a tag and a branch equally well,
and a textual test cannot tell them apart, so a branch of that name would have
been deployed to production.

validate-ref now emits the accepted ref in unambiguous form and deploy consumes
that: release-X and refs/tags/release-X both normalize to refs/tags/release-X,
which can only resolve to the tag and fails outright if the tag is absent. A
full SHA passes through unchanged. Everything previously rejected still is.

deploy falls back to github.ref when the output is empty, which is the tag-push
path where validate-ref is skipped — github.ref is already refs/tags/release-*
there, so both paths check out a fully-qualified tag.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01R8ZshwKmjD5fZ4Hs9dS6zh
Copilot AI review requested due to automatic review settings July 28, 2026 13:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/deploy-release.yml Resolved
validate-ref wrote an input-derived value straight to $GITHUB_OUTPUT. The
workflow_dispatch input is free text and the REST API accepts newlines in it,
so `release-2026-07-27\nref=refs/heads/main` produced two ref= lines, the last
one won, and deploy checked out main while the run's inputs still displayed the
tag. The guard was not merely weakened, it was bypassable while leaving a
misleading record — worse than not having it.

Vet the whole input against a single-line refname character class before
looking at its shape, then run git check-ref-format on the qualified tag. The
character class is matched with bash [[ =~ ]], not grep: grep is line-oriented
and would match a payload's first line and call the whole string good, which is
the same mistake in a different place.

check-ref-format is not belt-and-braces here. It rejects a second bypass of the
same family: release-../../heads/main passes any plausible character class and
refs/tags/release-../../heads/main can path-normalize to refs/heads/main. It
also rejects @{, a trailing .lock, and empty path components.

Verified the injection payload is refused, every previously accepted input still
normalizes as before, and everything previously rejected still is.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01R8ZshwKmjD5fZ4Hs9dS6zh
Copilot AI review requested due to automatic review settings July 28, 2026 13:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

.github/workflows/deploy-release.yml:90

  • The initial validation regex ^[A-Za-z0-9._/-]+$ is stricter than git’s tag grammar and the push.tags: ['release-*'] trigger, so a tag that can deploy via tag-push may be impossible to redeploy via workflow_dispatch (rollback). If the goal here is output-injection prevention, it’s sufficient to reject newlines/CRs before writing to $GITHUB_OUTPUT and rely on git check-ref-format for tag syntax.
          if [[ ! "$REF" =~ ^[A-Za-z0-9._/-]+$ ]]; then
            echo "::error::Refusing the dispatch ref: it must be a single line of [A-Za-z0-9._/-] characters. Pass a release-* tag or a full 40-character commit SHA."
            exit 1
          fi

.github/workflows/deploy-release.yml:98

  • if [[ "$ref" =~ ^release-[A-Za-z0-9._/-]+$ ]] rejects some refs that the workflow trigger accepts (e.g. a tag literally named release-, since release-* matches an empty suffix) and needlessly constrains valid tag characters. Since you already run git check-ref-format immediately after, it’s simpler and more consistent to check only the release- prefix here and let git enforce the actual tag-name rules.
          if [[ "$ref" =~ ^release-[A-Za-z0-9._/-]+$ ]]; then

@aterga
aterga merged commit 80b8586 into main Jul 28, 2026
2 checks passed
aterga pushed a commit that referenced this pull request Aug 3, 2026
Post-audit merges (#87-#115) that changed user-visible or documented
behavior, folded into the README:

- II's consent screen requires an explicit access-level choice (Questions
  only vs Actions & questions); it is not a read-only-by-default opt-out.
- Name the connect binding cookie correctly: mcp_connect, not sid, with
  Secure conditional on an https PUBLIC_URL.
- Document the official pages (/privacy-policy, /support, /terms) and the
  OpenAI domain-verification endpoint with its env-gated 404 behavior
  (#109, #112, #115).
- /version now reports the served II pairings via the instances array (#94).
- CWE-674: note the post-parse depth bounds on interface alias chains (#87)
  and the type-less reply decode/render path (#108).
- Companion-control note: percent-encoded slashes/dots in redirect paths are
  rejected (#107).
- Deploy: describe the reference native deployment pipeline (staging tracks
  main, release-* tags ship production with the binary attached) (#81, #93).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants