Repository navigation
refactor: rename SPIFFE_DEMO prefix to DOCSCLAW and fix workspace path - #95
Conversation
Replace all SPIFFE_DEMO-era naming artifacts with the current project identity, and fix the default workspace path to be container-safe. Breaking changes: - Env var prefix SPIFFE_DEMO_* → DOCSCLAW_* (e.g. DOCSCLAW_OTEL_ENABLED) - Config path /etc/spiffe-demo/ → /etc/docsclaw/ - Prometheus metric namespace spiffe_demo → docsclaw (all 7 metrics) - Logger env var SPIFFE_DEMO_LOG_FORMAT → DOCSCLAW_LOG_FORMAT Workspace fixes: - Default workspace /tmp/agent-workspace → /workspace (safe with readOnlyRootFilesystem: true in container hardening) - System prompt now includes workspace path so the LLM writes files to the correct location instead of guessing /tmp - Deployment manifests updated: volume mount at /workspace, agent-config.yaml workspace field updated to /workspace Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting 📝 WalkthroughWalkthroughThis PR updates workspace defaults and mounts from ChangesWorkspace and naming migration
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Address review feedback on PR #95: the initial commit renamed the default workspace in serve.go and the two primary deploy manifests, but left /tmp/agent-workspace in all other user-facing assets. Changes: - containers/Containerfile.security: create /workspace (same 65532:0 owner, 775 mode); point TRIVY_CACHE_DIR and GRYPE_DB_CACHE_DIR to /workspace/.cache/* so scanner databases land on the writable emptyDir volume rather than the read-only image layer - demo/batch/{finance,hr,security}: agent-config.yaml, deployment.yaml, deployment-template.yaml, and *-config.yaml batch run configs - demo/batch/dashboard/k8s.go: volume mount path - examples/{nps-explorer,skill-playground}: configmap + deployment - docs/demo/{hr-analyst,skill-discovery-test,executive-assistant}.yaml - README.md, docs/agent-config-guide.md (field reference default), site/getting-started.html - testdata/research-agent/agent-config.yaml - internal/workspace/workspace.go: update traversal-guard comment example from /tmp/agent to /workspace/agent Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
internal/cmd/serve.go (1)
260-268: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueWorkspace default and prompt injection look correct.
Default path, directory creation, and prompt injection are consistent with the new
/workspaceconvention and thereadOnlyRootFilesystem: truedeployments (which mount an emptyDir at/workspace).One minor note:
"/workspace"is now a hardcoded literal here and duplicated across multiple YAML configs. Extracting it as a package-level constant (e.g.,defaultWorkspace) would reduce drift risk if the path changes again.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/cmd/serve.go` around lines 260 - 268, The workspace default is hardcoded as a literal in the serve startup logic, which can drift from the same path used in deployment configs. Introduce a package-level constant such as defaultWorkspace in serve.go and use it in the workspace fallback and prompt text so the value is defined once and stays consistent across agentCfg.Tools.Workspace handling and the systemPrompt message.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@internal/cmd/serve.go`:
- Around line 260-268: The workspace default is hardcoded as a literal in the
serve startup logic, which can drift from the same path used in deployment
configs. Introduce a package-level constant such as defaultWorkspace in serve.go
and use it in the workspace fallback and prompt text so the value is defined
once and stays consistent across agentCfg.Tools.Workspace handling and the
systemPrompt message.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: e2ae9ccb-fa1e-4222-8954-9d4820e569b9
📒 Files selected for processing (31)
README.mdcontainers/Containerfile.securitydemo/batch/dashboard/k8s.godemo/batch/finance/agent-config.yamldemo/batch/finance/deployment-template.yamldemo/batch/finance/deployment.yamldemo/batch/finance/finance-analyst-config.yamldemo/batch/hr/agent-config.yamldemo/batch/hr/deployment.yamldemo/batch/hr/hr-screener-config.yamldemo/batch/security/agent-config.yamldemo/batch/security/deployment.yamldemo/batch/security/security-analyst-config.yamldeploy/agent-with-skills.yamldeploy/standalone-agent.yamldocs/agent-config-guide.mddocs/demo/executive-assistant.yamldocs/demo/hr-analyst.yamldocs/demo/skill-discovery-test.yamlexamples/nps-explorer/configmap.yamlexamples/nps-explorer/deployment.yamlexamples/skill-playground/configmap.yamlexamples/skill-playground/deployment.yamlinternal/cmd/serve.gointernal/config/config.gointernal/logger/logger.gointernal/metrics/metrics.gointernal/workspace/workspace.goopenspec/changes/rename-spiffe-and-fix-workspace/tasks.mdsite/getting-started.htmltestdata/research-agent/agent-config.yaml
Replace the /workspace literal with a package-level constant so the fallback value and the system prompt injection are defined in one place and cannot drift independently. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
Summary
SPIFFE_DEMO_*→DOCSCLAW_*ininternal/config/config.go/etc/spiffe-demo/→/etc/docsclaw/ininternal/config/config.gospiffe_demo→docsclaw(all 7 metrics) ininternal/metrics/metrics.goSPIFFE_DEMO_LOG_FORMAT→DOCSCLAW_LOG_FORMATininternal/logger/logger.go/tmp/agent-workspace→/workspace(safe underreadOnlyRootFilesystem: true)Migration notes
Anyone currently using
SPIFFE_DEMO_*env vars must switch toDOCSCLAW_*. Prometheus dashboards referencingspiffe_demo_*metric names must be updated (no known external consumers).Test plan
make test)make lint— 4 pre-existing issues only)SPIFFE_DEMO/spiffe-demo/spiffe_demostringsDOCSCLAW_*env varsdocsclaw_*metric names/workspace(not/tmp)🤖 Generated with Claude Code
Summary by CodeRabbit
/workspaceacross demos, deployments, examples, and configuration snippets./workspacewhen no workspace is set./workspacefor vulnerability tooling./workspaceand current DocsClaw naming/port env vars.