Skip to content

fix(mcpx): classify adapters allow-bare in e2e env guard - #13650

Closed
dezren39 wants to merge 2 commits into
mainfrom
lane/oc-code-08-13619
Closed

dezren39 wants to merge 2 commits into
mainfrom
lane/oc-code-08-13619

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Fixes the remaining main-branch mcpx test failures tracked by #13619.

Root causes (two, separate)

  1. Unit TestEveryDocumentationLinkResolves — already fixed on main in commit 5412831eebd: docs/glossary.md cited internal/api.Ops, which the documentation-link guard reads as a file path, and no such file exists. It now cites api.Ops in internal/api/ops.go. Verified green here.
  2. e2e shard 3, flake binary e2e, container e2e — all fail in TestEveryRegistryVariableIsHarnessSetOrSafe with MCPX_ADAPTERS_ALLOW_BARE (adapters.allowBare) is in neither table. That variable entered the settings registry (internal/settings/scriptenv.go) with the allow-bare adapter work but was never classified in the e2e env guard.

Change

One line: MCPX_ADAPTERS_ALLOW_BARE added to safeMCPX in pkgs/mcpx/internal/e2e/envguard_test.go. The harness never sets it, and the allowlist builder drops every inherited MCPX_* value, so the test observes the default unless a test sets it explicitly — which is exactly what safeMCPX means.

Failing-first evidence

# before
go test ./internal/e2e -run ^TestEveryRegistryVariableIsHarnessSetOrSafe -count=1 -v
--- FAIL: TestEveryRegistryVariableIsHarnessSetOrSafe (0.00s)
    envguard_test.go:315: MCPX_ADAPTERS_ALLOW_BARE (adapters.allowBare) is in neither table; ...

# after
--- PASS: TestEveryRegistryVariableIsHarnessSetOrSafe
go test ./internal/defaults -run TestEveryDocumentationLinkResolves -count=1 -v  → PASS
git diff --check → clean

Refs #13619. Locally verified; no merge by the author.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-23T19:37:37Z",
    "session_id": "ses_e5df64c9544ffeNsRzaBgsFy3Z",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/fleet/13619-oc-code-08",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/fleet/13619-oc-code-08",
      "repo": "developing-today/code",
      "branch": "lane/oc-code-08-13619",
      "sha": "bbc5a3940292c7934f94cf13ef9150b54405dd97"
    },
    "auth_subject": "oc-code-02",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Start Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Tests
    • Updated environment safety checks to allow MCPX_ADAPTERS_ALLOW_BARE under the test harness’s inherit-nothing policy.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 66724e3b-54c1-4d06-87db-fe4cfaddbf9c
Commits

Reviewing files that changed from the base of the PR and between bbc5a39 and 5361655.

Files selected for processing: 1

  • pkgs/mcpx/internal/e2e/envguard_test.go

No actionable comments were generated in the recent review.

Walkthrough

The safeMCPX classification table now includes MCPX_ADAPTERS_ALLOW_BARE.

Changes: Environment guard classification

Layer / File(s) Summary
Add adapter variable to safe classification
pkgs/mcpx/internal/e2e/envguard_test.go
The safeMCPX classification table now includes MCPX_ADAPTERS_ALLOW_BARE.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Other

Suggested reviewers: claude

Merge Risk: Minimal · previous review bbc5a

This change only classifies an adapter environment variable in an end-to-end test guard so the registry check passes. It does not touch production behavior, and the merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change: it adds MCPX_ADAPTERS_ALLOW_BARE to the safe classification in the e2e env guard test. The raw summary confirms a one-line change to envguard_test.go that does exactly this…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change: it adds MCPX_ADAPTERS_ALLOW_BARE to the safe classification in the e2e env guard test. The raw summary confirms a one-line change to envguard_test.go that does exactly this, and the PR objectives describe the same fix for the failing TestEveryRegistryVariableIsHarnessSetOrSafe test. The title is specific and matches the main change.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4cc607fc-37f8-4b4d-b476-6f1f879c03e9
Commits

Reviewing files that changed from the base of the PR and between ab82a4d and bbc5a39.

Files selected for processing: 1

  • pkgs/mcpx/internal/e2e/envguard_test.go

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@dezren39

Copy link
Copy Markdown
Member Author

Closing as a duplicate of #13653, which carries the identical one-line change (MCPX_ADAPTERS_ALLOW_BARE added to harnessSetMCPX in pkgs/mcpx/internal/e2e/envguard_test.go) and the fuller leg-by-leg disposition on #13619. Verified independently here at 5361655a0d4: TestEveryRegistryVariableIsHarnessSetOrSafe, TestTheHarnessBuildsChildrenFromTheAllowlist, TestAdaptersAllowBareGatesABareDeclaration, and TestEveryDocumentationLinkResolves all pass locally. The unit docs-link failure needs no change — main already has the glossary fix (5412831eebd). Keeping #13653 as the single PR to merge.

@dezren39

Copy link
Copy Markdown
Member Author

Closed as superseded. Duplicate of #13653, which carries the identical one-line fix and the fuller leg-by-leg disposition on #13619.
Successor: 13653

@dezren39 dezren39 closed this Nov 23, 2026
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