Skip to content

mcpx testing: a contributor test page agents load, kept out of the user-facing AGENTS.md #1976

Closed

Description

@dezren39

Relocated from dezren39/darwin-nix#131 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/nix numbering).

Parent: #99

Summary

Write one contributor page that tells agents working on mcpx the test policy -- what to run (#127), a test per bug (#128), guards per class (#129), flakes (#130) -- and make sure agents editing mcpx code actually load it, without adding it to pkgs/mcpx/AGENTS.md, which is the user-facing guide to using mcpx. (The book itself belongs to the documentation tree; this is only the contributor page.)

Original notes

  • testing
    • importantly, as we add more testing agents should not run every single test basically ever. below documents a rough idea of a ci job design/policy, the main priority is being short as possible.
    • agents should make at least 1 simple, new test for every bug observed from any source, when cheap to do so-- aggresively test many permutations.

(The page states the policies decided in the sibling issues; the notes above are quoted there in full with their context.)

Current state

  • pkgs/mcpx/AGENTS.md (109 lines) is about using mcpx ("Every MCP server on this machine is reachable from the shell through mcpx" ... "The loop") and says nothing about tests. docs/release-runbook.md:44 treats it as the instruction file "quoted in full" in the published material, so its length is a user-facing cost. There is no repo-root AGENTS.md.
  • There is no CONTRIBUTING.md, no docs/testing.md, no PR template. The closest contributor material is scattered in PR bodies ("Verified it fails without the fix", "suite 3x clean", "-race clean").
  • How opencode picks up instruction files (source of the version in the nix store, packages/opencode/src/session/instruction.ts):
    • at session start: the first AGENTS.md (else CLAUDE.md) found walking up from the working directory, plus the global file, plus instructions globs from opencode.json (lines 115-150);
    • on every file read: Instruction.resolve (lines 179-221, called from tool/read.ts:300) walks up from the file being read to the project root and attaches each directory's AGENTS.md/CLAUDE.md not already loaded, once per message.
    • Consequence 1: a nested pkgs/mcpx/internal/AGENTS.md reaches exactly the agents that read mcpx source, and nobody else.
    • Consequence 2: an agent reading pkgs/mcpx/internal/... from the repo root already gets pkgs/mcpx/AGENTS.md attached (the walk passes through pkgs/mcpx/). Everything added to that file is paid by contributors as well as users.
  • Other harnesses: Claude Code loads nested CLAUDE.md files on demand when it reads files in that subtree; Codex concatenates AGENTS.md from the repo root down to the working directory. So a nested file is the portable mechanism; the exact trigger differs (open question for non-opencode harnesses).
  • Not verified: the mechanism by which pkgs/mcpx/AGENTS.md reaches consuming agents outside this repo. Nothing in package.nix installs it and the plugin's instructions option injects a fixed four-sentence string instead (plugin/opencode/mcpx-session.ts:737-746 at 05c78b2, off by default). Either way it is published as the user guide, so the conclusion stands.

Approaches

A -- append a "Developing mcpx" section to pkgs/mcpx/AGENTS.md (least recommended)

One file, zero discovery questions, and opencode's read-time walk already attaches it for contributors. But every consumer of the user guide pays for contributor rules it cannot use (tiers, -count=1, quarantine), the release runbook's "quoted in full" material grows, and the file stops being about one audience. The user asked for this concern to be weighed; it loses.

B -- a contributor file only (pkgs/mcpx/CONTRIBUTING.md or pkgs/mcpx/docs/testing.md)

The conventional home, readable by humans on GitHub, and the book can link it. But no harness loads CONTRIBUTING.md on its own; it reaches an agent only if someone adds it to an instructions list (per-user config, not the repo) or the agent happens to open it. Agents would keep running go test ./... because nothing told them otherwise.

C -- the page in docs/testing.md, plus a short nested pkgs/mcpx/internal/AGENTS.md that points at it (recommended)

  • pkgs/mcpx/docs/testing.md: the full policy -- tiers and commands with timings, the per-bug rule and checklist, when to add a guard and how, flake handling, how to reproduce a CI failure. Human-readable; the book (docs tree) links it; CONTRIBUTING.md, if wanted, is a three-line pointer to it.
  • pkgs/mcpx/internal/AGENTS.md (~15-25 lines): the rules an agent must not miss -- never go test ./... or unfiltered e2e locally for a routine change (Update Rust crate tracing to v0.1.40 [SECURITY] #127; the reason is time, now that Phase 5: tag event bodies must travel with the event #182 fixed chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to e7457f6 #52's leak), always -count=1 for e2e, the just/script command from Update Rust crate tracing to v0.1.40 [SECURITY] #127, one failing-first test per bug, guards when touching a registry, read CI before merging -- and "details: docs/testing.md". Placed under internal/ so it is attached only when an agent reads Go source there, which is when it is about to change or test something. (cmd/ is one file; a second copy there is unnecessary.)
  • A CLAUDE.md symlink beside it is unnecessary for opencode (it prefers AGENTS.md) but cheap for Claude Code users; decide in open questions.
  • pkgs/mcpx/AGENTS.md stays untouched.

Recommended because it costs users nothing, reaches contributor agents automatically through the read-time walk, keeps one source of truth (the nested file is a summary with a pointer, not a copy), and survives a harness change since it relies only on the nested-file convention.

A guard (per #129) can keep the summary honest: a unit test that every command quoted in internal/AGENTS.md names a test or recipe that exists.

Tasks

Open questions

  • docs/testing.md vs CONTRIBUTING.md as the canonical file name (GitHub surfaces CONTRIBUTING.md in the PR UI only at repo root or .github/, and this repo is a whole nix config -- so a package-level CONTRIBUTING.md gets no special treatment).
  • Should the nested file sit at pkgs/mcpx/internal/AGENTS.md or at pkgs/mcpx/internal/e2e/AGENTS.md (narrower, only loaded when touching e2e, but then misses unit-only changes)?
  • A CLAUDE.md alongside for Claude Code, or rely on its AGENTS.md support?
  • Should the repo root get its own short AGENTS.md for the nix repo as a whole? Out of scope here; note for the owner.

Ease · Impact · Related

Ease S · Impact high (it is what makes the other policies reach agents)
Depends on / related: siblings #127, #128, #129, #130; #52 (closed, fixed in #182), #93 (seed/repro wording), #95 (CI facts the page quotes), #97; the documentation tree (#89, the book); #91.

Security/auth deferred; see tracker.

Acceptance criteria

  • One contributor test-policy page exists in the documentation tree (not in pkgs/mcpx/AGENTS.md, which stays the user-facing guide to using mcpx), covering: what to run, a test per bug, guards per class, and the flake policy — referencing the sibling policy issues rather than duplicating them.
  • A loading mechanism is in place so agents editing mcpx code actually load the page, and the mechanism is named on this issue.
  • The work described in the Summary/Scope above is delivered via a branch + PR (no direct push to main); verification runs in GitHub Actions CI, not on the sandbox.
  • Evidence (the page path and the loading mechanism) is recorded on this issue before it is closed.

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    History carried over from dezren39/darwin-nix#131 (verbatim, oldest first):


    @dezren39 · 2026-09-30T07:21:22Z

    Integration pass. Placed in the DAG rooted at #181.


    @dezren39 · 2026-09-30T12:03:37Z

    Issues pass (2026-09-30, at 05c78b2).

  3. added
    kind/docsDocumentation improvement or addition
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 29, 2026
  4. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Intake review

    🤖 Agent note · state: filed

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: repo-fleet-monitor run 2026-10-28 19:19 CDT
    • Found via: monitor reconciliation (intake enrichment, protocol §5)
    • Task: intake enrichment — acceptance criteria, normalized labels, this review
    • Expectation: effort/m; done when the AC section, labels, and this note are on the issue
    • Links: n/a
  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 29, 2026
  6. 46 remaining items

  7. added
    queue/queuedHas a queued task in the Supabase agent queue
    and removed
    work/assignedQueue worker lifecycle state
    on Nov 3, 2026
  8. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: task 7828
    • Found via: monitor reconciliation
    • Task: Claim-eviction repair: the queue task for this issue is queued and unclaimed (its previous claim's lease expired without a complete/park/block), but the issue labels still said claimed. Labels reset to the truth: queue/queued + status/needs-triage. Checkpoint stage on the task: handed_off.
    • Expectation: a queue lane re-claims the task and resumes from the checkpoint stage named in the task progress.
  9. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  10. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: picked-up (task 7828)

  11. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Triage verdict — task 7828 (2026-11-03)

    Already delivered; no new implementation is needed. PR #2666 (#2666) merged on 2026-10-30 as c317b9616d71bb5e5ad5be9dabb660aefe691b50. It added pkgs/mcpx/docs/testing.md, the contributor loading pointer pkgs/mcpx/internal/AGENTS.md, and the compendium manifest entry. Fresh verification found all three paths on origin/main; the user-facing pkgs/mcpx/AGENTS.md was not part of that PR. The acceptance criteria are met, so closing this issue as delivered.

    agent-note:v1
    state: done (task 7828)

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

Metadata

Metadata

Assignees

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/docsDocumentation improvement or additionmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions