Skip to content

fix: mount agentsMd at all preset discovery filenames#240

Open
marvin-69-jpg wants to merge 1 commit intoopenabdev:mainfrom
marvin-69-jpg:fix/agentsMd-preset-filenames
Open

fix: mount agentsMd at all preset discovery filenames#240
marvin-69-jpg wants to merge 1 commit intoopenabdev:mainfrom
marvin-69-jpg:fix/agentsMd-preset-filenames

Conversation

@marvin-69-jpg
Copy link
Copy Markdown
Contributor

Summary

agentsMd content was mounted only at AGENTS.md, which works for the kiro and codex presets but is silently ignored by claude (expects CLAUDE.md) and gemini (expects GEMINI.md).

This PR mounts the same configmap key (AGENTS.md) at all three discovery filenames:

  • AGENTS.md (kiro, codex)
  • CLAUDE.md (claude)
  • GEMINI.md (gemini)

No change to the configmap — just additional volumeMount entries in the deployment template.

Details

Implements Option 2 from the issue discussion (mount to all three filenames). This is the simplest approach: zero preset-awareness needed in helpers, fully backward compatible, and the slight storage redundancy is negligible since it's the same configmap key.

Fixes #134

Claude Code only auto-discovers CLAUDE.md and Gemini only discovers
GEMINI.md, so the agentsMd content was silently ignored for those
presets. Mount the same configmap key at all three discovery filenames
so any preset picks it up.

Fixes openabdev#134
@thepagent thepagent added the p1 High — address this sprint label Apr 15, 2026
@thepagent thepagent assigned thepagent and masami-agent and unassigned thepagent Apr 15, 2026
Copy link
Copy Markdown
Contributor

@masami-agent masami-agent left a comment

Choose a reason for hiding this comment

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

✅ Approved

Clean, minimal fix for a p1 bug. Reviewed the full diff and the issue context.

What it does

Mounts the same configmap key (AGENTS.md) at three discovery filenames:

  • AGENTS.md — kiro, codex
  • CLAUDE.md — claude
  • GEMINI.md — gemini

This is Option 2 from the issue discussion, confirmed acceptable by CHC-Agent.

Verification

  • ✅ All three new mounts are inside the {{- if $cfg.agentsMd }} guard — no mount when agentsMd is empty
  • ✅ All use subPath: AGENTS.md — same configmap key, no duplication needed
  • workingDir uses the same $cfg.workingDir | default "/home/agent" pattern as the existing mount
  • ✅ No changes to values.yaml or configmap template needed — the configmap already stores the content under the AGENTS.md key
  • ✅ Backward compatible — existing kiro/codex deployments are unaffected
  • ✅ Scope is clean — one file, one concern

One consideration (non-blocking)

If a user has a real CLAUDE.md or GEMINI.md on the PVC, this volumeMount will shadow it. This is acceptable because:

  1. agentsMd is explicitly set by the operator — they intend it to be the source of truth
  2. The existing AGENTS.md mount already has this behavior

Fixes #134. Recommend squash merge.

Copy link
Copy Markdown
Collaborator

@obrutjack obrutjack left a comment

Choose a reason for hiding this comment

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

Merge checklist verified:

  • ✅ CI N/A (only Helm template change, no Rust code)
  • ✅ No merge conflicts
  • ✅ No regression — additive only, existing AGENTS.md mount unchanged
  • ✅ Backward compatible — new mounts inside existing agentsMd guard
  • ✅ No secrets in diff
  • ✅ masami-agent approved

Clean fix for p1. Pending code owner review from @thepagent.

Copy link
Copy Markdown
Collaborator

@chaodu-agent chaodu-agent left a comment

Choose a reason for hiding this comment

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

Triage Review — PR #240

🟢 INFO

  • Minimal, precise fix for a P1 bug — 6 lines, one file, one concern
  • All three mounts are inside the {{- if $cfg.agentsMd }} guard — no mount when agentsMd is empty
  • All use subPath: AGENTS.md pointing to the same configmap key — no data duplication
  • workingDir follows the same $cfg.workingDir | default "/home/agent" pattern as the existing mount
  • Fully backward compatible — existing kiro/codex deployments unaffected
  • No changes needed to configmap or values.yaml

🟡 NIT

  • If a user has a real CLAUDE.md or GEMINI.md on the PVC, the volumeMount will shadow it. Acceptable since the operator explicitly set agentsMd as source of truth, consistent with existing AGENTS.md behavior

🔴 SUGGESTED CHANGES

  • None

Clean fix. Recommend squash merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p1 High — address this sprint

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agentsMd value silently ignored by claude / gemini presets — Claude Code only auto-discovers CLAUDE.md

5 participants