feat(infra): wire Notion + PostHog API keys into Sam's runtime, stage Attio#144
Merged
Conversation
Adds the two new keys the operator provisioned to the config.yaml secrets map — Terraform creates the Secret Manager resources, upload-secrets.sh pushes the values from .env, and the CI deploy composes them into Cloud Run --set-secrets. Sessions inherit the daemon's env (session.py env=os.environ.copy()), so $NOTION_API_KEY / $POSTHOG_API_KEY are usable from session bash the deploy after the secrets exist. Both names contain KEY, so the PR #139 redactor scrubs them from outbound posts. ATTIO_API_KEY is staged but commented in both files: no key exists yet, and mounting a versionless secret fails the Cloud Run revision. Deploy order (documented in-file): terraform apply + upload-secrets.sh BEFORE merging this — merging first would deploy a mount for secrets that don't exist yet. .env.example also gains the missing EXA_API_KEY line (drift since PR #72). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Adds
NOTION_API_KEYandPOSTHOG_API_KEYtoinfra/config.yaml's secrets map — the single source both Terraform (secret resources, EU-pinned replication) and the CI deploy (--set-secrets) read. Sessions inherit the daemon env (session.pypassesos.environ.copy()), so both keys are usable from session bash immediately after deploy. Both names match the PR #139 redaction filter, so values get scrubbed from any outbound Slack post.ATTIO_API_KEYis staged but commented out in bothconfig.yamland.env.example: no key has been provisioned yet, and deploying a mount for a versionless secret fails the Cloud Run revision. Uncommenting + apply + upload is the whole enable path later.Also restores the missing
EXA_API_KEYline in.env.example(drift since #72).terraform applyininfra/(creates the two secret resources)bash infra/scripts/upload-secrets.sh(pushes values from local.env)Merging first deploys a mount for secrets that don't exist → failed revision.
Follow-up
Sam gets told about the new keys via journal + #sam once they're live; PR #126 (Notion skills) becomes fully functional the moment
NOTION_API_KEYis mounted. PostHog/Attio capabilities tracked separately in Linear.🤖 Generated with Claude Code