Skip to content

fix(deploy): hydrate the tuned coach prompt from S3, not SSM#89

Merged
cipher813 merged 1 commit into
mainfrom
chore/coach-prompt-s3-hydration-260708
Jul 8, 2026
Merged

fix(deploy): hydrate the tuned coach prompt from S3, not SSM#89
cipher813 merged 1 commit into
mainfrom
chore/coach-prompt-s3-hydration-260708

Conversation

@cipher813

Copy link
Copy Markdown
Contributor

Summary

Attempting the first-ever real deploy of the tuned coach prompt (vires-ops#53/#54) hit a hard SSM ceiling: Parameter Store caps at 4096 chars (Standard) / 8192 chars (Advanced tier), and the tuned prompt is 9091 chars. This deploy path had never actually been exercised with real content before — prod has been running the public baseline via fallback since the coach prompt split was introduced — so the size ceiling was never hit until today's actual attempt.

Switches the hydration source from SSM to a private S3 bucket, mirroring this repo's own existing pattern for the web-dist deploy artifact (VIRES_DIST_S3). No size ceiling.

Infra already provisioned (done this session, live now)

  • New bucket vires-secrets — Block Public Access (all 4), default SSE-S3 encryption. Dedicated to this one product rather than reusing the broadly-shared alpha-engine-research bucket (that bucket is read by many unrelated alpha-engine principals — wrong blast radius for a genuine secret).
  • Tuned prompt already uploaded to s3://vires-secrets/coach_system_prompt.txt.
  • The box's existing IAM role (alpha-engine-dashboard-role, shared with the co-tenant dashboard) granted a new scoped inline policy: s3:GetObject on vires-secrets/* + s3:ListBucket on the bucket. Read-only, nothing else.

This PR is merge-button-deployable

deploy-on-merge.sh fetches from S3 automatically on every deploy (same non-fatal-if-missing fallback as before — no object → committed baseline, deploy still succeeds). Since the bucket/object/IAM are already live, merging this PR completes the deploy in one step — no manual follow-up command needed. Verify via the deploy log line: coach: hydrated tuned prompt from s3://vires-secrets/coach_system_prompt.txt.

Test plan

  • bash -n infrastructure/deploy-on-merge.sh — syntax clean
  • Verified vires-secrets bucket: public access blocked, SSE-S3 enabled, IAM policy scoped correctly
  • Verified upload succeeded (aws s3 cp completed, object present)
  • Post-merge: confirm the deploy log shows the hydration line above (this is the live functional verification — will check after merge)

SSM Parameter Store caps out at 4096 chars (Standard tier) / 8192 chars
(Advanced tier). The tuned coach prompt is 9091 chars — this deploy path
had apparently never been exercised with real content before (prod has
been running the public baseline via fallback since inception), so the
ceiling was never hit until the actual first deploy attempt today
(2026-07-08).

S3 has no such ceiling and mirrors this repo's own existing pattern for
the web-dist deploy artifact (VIRES_DIST_S3). New private bucket
(vires-secrets — blocked public access, default SSE-S3, dedicated to this
one product rather than reusing a broadly-shared alpha-engine bucket),
box's existing IAM role granted read-only s3:GetObject on it.

Same non-fatal-if-missing behavior as before: no object at the configured
path -> falls back to the committed baseline, deploy still succeeds.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@cipher813 cipher813 merged commit c142f23 into main Jul 8, 2026
3 checks passed
@cipher813 cipher813 deleted the chore/coach-prompt-s3-hydration-260708 branch July 8, 2026 20:26
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.

1 participant