Skip to content

docs: plan provider setup follow-up on unified providers - #1440

Merged
jbeda merged 3 commits into
mainfrom
plan/mecatui-local-provider-setup
Sep 17, 2026
Merged

jbeda merged 3 commits into
mainfrom
plan/mecatui-local-provider-setup

Conversation

@JAORMX

@JAORMX JAORMX commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Stage: Plan / Interface

Reconciles this existing PR #1440 after merged PR #1448. The canonical implementation baseline is fdbd369c50c804ee391457a666d7471f53ec6069; this amended plan head is 9b15e85b768cd55084c311c5611820b7c801228f.

  • Classification: Bounded. ADR 0333 and the merged unified-provider acceptance plan already own architecture, schema, custody, and portable-writer policy. No new ADR is needed.
  • Contract: docs/acceptance/mecatui-local-provider-setup.md, human-reviewed/v2, proposed; four scenarios, eleven newly named AC proofs.
  • Decision record: None — this completes UX and implementation guarantees inside the merged contract. ADR 0332 is retained only as an explicitly superseded, never-accepted proposal.
  • Delivery: Split; implementation remains draft feat: complete provider setup UX on unified configuration #1441 on this branch. The directing human authorized reconciliation and stacking before plan merge, not an agent merge to main. This PR remains unmerged; its head is not an approved merged-plan baseline.

Remaining scope

  1. Rich passive status: effective credential provenance/shadowing, selected default, no health claims, runtime precedence parity, unchanged passive OIDC and external ToolHive behavior.
  2. Existing setup/login: provider-specific console and API-versus-consumer guidance (including OpenCode Go versus Zen), plaintext-custody disclosure, explicit reuse/replacement, hidden <=8 KiB accepted key entry, separate save/default consent, real-terminal cancellation/echo/non-disclosure proofs.
  3. Existing manual Codex credential status/default reuse through the runtime loader, and bare declared-model resolution through shared composition authority. No Codex enrollment, refresh, import, token entry, or mutation.
  4. Audit/repair shared Linux/macOS private-file guarantees, with special-file/canonical-parent race and durability fault regressions. Preserve snapshot comparison and existing outcomes; no cooperative locks or universal POSIX CAS claim.

Preserved contract / deliberate exclusions

Keep mecatui providers and the current flat setup/add/login/logout/set-default/remove commands, unified providers.NAME authentication schema, configured credential custody, and startup --api-key-file. No per-command file flags, old llm forms, new store/schema/protocol/engine API, automatic startup, or nested action menu.

Add still normally chains login; logout removes only credentials; remove still permits removal of the selected custom default after combined confirmation, with no automatic replacement default. Existing OIDC status/store inspection and add cancellation cleanup remain intact.

History and scope

Normal merge of current main into the existing plan branch; no rebase, force push, or history rewrite. Previous tips are preserved in merge ancestry and local archival refs. Relative to current main, this PR changes only the acceptance plan, its index, the superseded-proposal annotation on ADR 0332, and its index. Accepted ADR 0333 decision text is untouched. No runtime follow-up code is implemented here.

Verification

  • Acceptance-plan checker: passed (11 ACs).
  • Checker regression fixtures: passed.
  • task docs: passed; strict link gate reports no broken links/anchors, ambiguous links, or unreachable/orphan documents.
  • git diff --check: passed; no generated/lockfile drift.
  • Fresh baseline task lint: passed in all seven modules. Offline demo: passed.
  • Full task test: root suite failed only TestCrossProcessLeaseExpiryTakeover at internal/app/lease_exclusion_test.go:243; its one-second lease expired before the test's assumed pre-expiry assertion under suite load. Five isolated race-enabled repeats passed. Runtime/test code is byte-identical to main; this timing-sensitive baseline failure is triaged, not silently fixed in a documentation/preparation step. Task stopped before sibling-module tests; full-suite green is not claimed.
  • This documentation-only contract does not claim the new AC tests already exist or that historical prototype reviews verify them.
  • Post-push CI: green for 9b15e85b768cd55084c311c5611820b7c801228f, monitored to completion with gh pr checks --watch (exit 0). Applicable docs, site, domain, docs-only tests, lint and advisory checks passed; non-applicable runtime jobs were skipped, not claimed as runtime verification.

Tracking: implementation PR #1441. No issue-closing relationship.

@JAORMX JAORMX changed the title docs: propose mecatui local provider setup contract docs: plan provider setup follow-up on unified providers Sep 14, 2026

@jhrozek jhrozek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Docs-only plan PR reviewed via a devils-advocate design critique (adapted from pr-review-toolhive for this repo's ADR/acceptance-plan process, since there's no code to review). Design and scope are solid: the four scenarios are well-bounded, the CLI/precedence/credential claims check out against ADR 0333 and the merged unified-provider plan, and docs/lint (ADR numbering, citation validity, lifecycle checks) passes clean. Three process/wording nits below, none of which touch the design itself — approving with those as follow-up comments.

@@ -0,0 +1,141 @@
# ADR 0332 — Mecatui local provider enrollment preserves existing credential custody

- Status: Superseded proposal — never accepted; superseded by [ADR 0333](0333-unified-provider-configuration-and-mecatui-provider-commands.md) and merged PR #1448

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

docs/adr/template.md fixes Status to exactly Proposed | Accepted | Superseded, with the supersession pointer on its own dedicated Superseded by: line ("the only edit a frozen ADR takes"). This rewrites Status itself into free text instead. Worth conforming to the canonical fields:

Suggested change
- Status: Superseded proposal — never accepted; superseded by [ADR 0333](0333-unified-provider-configuration-and-mecatui-provider-commands.md) and merged PR #1448
- Status: Superseded
- Superseded by: [ADR 0333](0333-unified-provider-configuration-and-mecatui-provider-commands.md) (merged as PR #1448); this proposal itself was never accepted

Non-blocking — cosmetic, but it keeps docs/lint/future ADR tooling able to treat Status as a closed enum.

[ADR 0333](../adr/0333-unified-provider-configuration-and-mecatui-provider-commands.md)
and the [unified-provider contract](unified-provider-configuration-and-mecatui-provider-commands.md)
supersede the unmerged ADR 0332/prototype. Their authority follows merged ancestry even where
historical metadata still says proposed. This plan replaces its earlier proposal in full;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This plan's "Bounded" classification (no new ADR needed) leans entirely on ADR 0333 already being a settled, accepted decision — but docs/adr/0333-unified-provider-configuration-and-mecatui-provider-commands.md line 3 still literally reads Status: Proposed, even though its own acceptance plan is landed and PR #1448 is merged. Per ADR 0306, "merging the PR is the acceptance event," so that flip appears to have just been missed.

Non-blocking for this PR, but worth flipping ADR 0333's Status to Accepted in this PR or immediately after — otherwise this plan's classification is standing on a proposal that self-reports as unaccepted.

not ADR 0332's superseded Linux/lock design.

**Acceptance:**
- AC4.1: Linux and macOS regressions cover unsafe symlink/special-file leaves (including FIFO substitution without blocking), canonical-parent replacement during mutation, private ownership/modes, same-directory temporary replacement, cancellation and final snapshot mismatch. Repair any demonstrated bypass of the existing checks at the shared writer; no write or cleanup may escape the validated parent via a substituted link. Conventional home aliases remain supported. No sidecar lock/retry protocol, recursive parent creation, or platform regression is introduced.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AC4.1 enumerates specific, checkable regression scenarios (symlink/special-file leaves, FIFO substitution, canonical-parent replacement, ownership/modes, same-directory replacement, cancellation, snapshot mismatch) but then appends an open-ended catch-all: "Repair any demonstrated bypass of the existing checks at the shared writer." That's a task, not an observable behavior — there's no way for a TDD worker or ac-trace to know when it's satisfied beyond the named list.

Non-blocking, but consider dropping the catch-all clause or scoping it to a specific enumerated bypass class.

@JAORMX
JAORMX added this pull request to stack #1619 September 16, 2026 07:51
@jbeda
jbeda force-pushed the plan/mecatui-local-provider-setup branch from dd85726 to 9b28a79 Compare September 17, 2026 00:20
JAORMX and others added 3 commits September 17, 2026 09:01
Record the authorized read-only status and default-selection amendment; keep upstream enrollment and token mutation out of scope.

Co-Authored-By: Astra <[email protected]>
@jbeda
jbeda force-pushed the plan/mecatui-local-provider-setup branch from 9b28a79 to dfd0134 Compare September 17, 2026 16:01
@jbeda
jbeda merged commit 8f2c1eb into main Sep 17, 2026
29 checks passed
@jbeda
jbeda deleted the plan/mecatui-local-provider-setup branch September 17, 2026 16:20
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Sep 21, 2026
2 tasks
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.

3 participants