Skip to content

Add K8s auto-develop, license change, secure prompts#2

Merged
flavienbwk merged 8 commits intomainfrom
k8s-auto-develop
Mar 9, 2026
Merged

Add K8s auto-develop, license change, secure prompts#2
flavienbwk merged 8 commits intomainfrom
k8s-auto-develop

Conversation

@flavienbwk
Copy link
Copy Markdown
Collaborator

@flavienbwk flavienbwk commented Mar 9, 2026

Summary

  • WF01 rewritten: Replace 38-node n8n agentic loop with 19-node K8s Job workflow (Claude Code CLI in a container)
  • Two deployment modes: n8n_claude_k8s/ (K8s, recommended) and n8n_standalone/ (preserved, no K8s needed)
  • K8s infrastructure: Dockerfile, entrypoint, job template, NetworkPolicy, RBAC setup script
  • No more hardcoded secrets: All environment-specific values (K8s API URL, namespace, image, GitHub project board IDs) replaced with placeholders injected by deploy.py from credentials.env; deploy fails if any required var is missing
  • Prompt injection defense: All LLM prompts wrap user-supplied content (issue body, PR diffs, CI logs, alert payloads) with per-invocation random boundary delimiters and instruct the model to treat delimited content as untrusted data
  • CI pipeline: GitHub Actions workflow to build/push the Claude Code Docker image on release branch
  • Docs: Rewritten as concise setup instructions
  • More resilient auto-fix mechanism
  • Changed license from MIT to AGPL v3

Test plan

  • make deploy-all succeeds with placeholder injection across all 5 workflows
  • Deployed workflows verified to contain no placeholders or hardcoded IDs
  • Secret scan: no tokens, API keys, or credential IDs in any committed file
  • Boundary delimiters present in all 8 prompt-building scripts (both modes)
  • End-to-end test: issue #47 moved to AI Ready on the board (in progress)

CLA

  • Contributor License Agreement

Replace the 38-node n8n agentic loop (WF01) with a 19-node workflow
that launches Claude Code CLI in Kubernetes Jobs. The old standalone
variant is preserved in n8n_standalone/ for non-K8s environments.

Key changes:
- n8n/ split into n8n_claude_k8s/ (K8s Jobs) and n8n_standalone/ (agentic loop)
- K8s infra: Dockerfile, entrypoint, job template, NetworkPolicy, RBAC setup
- deploy.py: new map_env_vars() replaces hardcoded K8s URLs, project board
  IDs, and image refs with placeholders injected from credentials.env;
  script fails if any required env var is missing
- CI: GitHub Actions workflow to build/push Claude Code image on release branch
- Docs rewritten as setup-focused instructions
Defense-in-depth against prompt injection: all prompts that include
user-controlled data (issue body, PR diffs, CI logs, alert payloads)
now wrap that content with a per-invocation random boundary and instruct
the model to treat everything inside as untrusted data.

Updated scripts: wf01-k8s-01, wf01-agent-01, wf01-09, wf02-08,
wf02-fix03, wf03-11, wf04-02, wf04-03 (both K8s and standalone).
@flavienbwk flavienbwk changed the title Add K8s auto-develop and parameterize env config Add K8s auto-develop, parameterize env config, secure prompts Mar 9, 2026
@flavienbwk flavienbwk changed the title Add K8s auto-develop, parameterize env config, secure prompts Add K8s auto-develop, license change, secure prompts Mar 9, 2026
CI failure logs often have the actual error at the bottom, but the
previous 30K head truncation cut it off after Docker pull output.
Now keeps first 5K (build context) + last 25K (test failures).
PR titles were derived from the truncated branch slug (40-char limit),
producing names like "Add A Subtle Gradient Background To The".
Now fetches the full issue title via GitHub API and uses it instead.
- Add gh CLI to Docker image and configure auth in entrypoint
- Add imagePullPolicy: Always to K8s job manifests (WF01 + WF03)
- Replace 13 old auto-fix nodes (parse/match/commit via API) with
  10 K8s nodes (build job → create → poll → read logs → post result)
- Claude Code now has full repo access + gh CLI for reading CI logs,
  PR comments, and running tests locally
- Handle "succeeded but no push" case in result comment (already fixed)
@flavienbwk flavienbwk merged commit f0c5bc0 into main Mar 9, 2026
1 check passed
@flavienbwk flavienbwk deleted the k8s-auto-develop branch March 9, 2026 04:40
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