Verify extension load behavior with and without MONGODB_URI #146
Labels
No labels
bug
chore
documentation
enhancement
feature
ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
david/pi-extensions-and-skills#146
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Manually verify the extension loads both ways: pi boots with zero
mongo_*tools whenMONGODB_URIis not configured, and with the three tools plus the confirmation line when it is.Background
Depends on: #143
This is the end-to-end load gate for the extension — the unit tests prove the factory logic, but this step proves pi actually loads
extensions/mongodb/index.tsin both configuration states. Because the client is lazy, a configured-but-unreachable URI is fine for this check: pi must not try to connect at load time.Documentation Required
A separate process downloads these into the listed folder before this issue is implemented. Check the folder for the actual reference material before starting.
docs/reference/pi-coding-agent/— for loading an extension with pi:/home/david/.bun/install/global/node_modules/@earendil-works/pi-coding-agent/README.md— pi main documentation (how to launch pi and load extensions)./home/david/.bun/install/global/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md— extension loading, the-e/extension flag, and startup output.Implementation Details
Run pi against the extension file using the repo's standard extension-load flow — the plan calls out
pi -e ./extensions/mongodb/index.ts(confirm the exact flag in the pi docs or by checking how the sibling extensions are loaded in this repo; use whatever the repo's standard flow is).MONGODB_URI(and noMONGODB_URI-shaped key) is set in the environment/.env, then load pi. Expected: pi boots cleanly (no errors, no warnings), and the tool list contains zeromongo_*tools.MONGODB_URI(a real URI or an unreachable one likemongodb://127.0.0.1:1/test— lazy connect means it should not matter at load time), then load pi. Expected: the three toolsmongo_find,mongo_count,mongo_list_collectionsappear, and startup output containsMongoDB extension loaded: connected to <host>:<port>/<db>.Acceptance Criteria
mongo_*tools and no error/warning about MongoDB.MongoDB extension loaded: connected to <host>:<port>/<db>prints with the correct host/port/db parsed from the URI.Test Plan
Record both runs' tool lists and the confirmation line in your notes/PR description.
Verification note (issue 146 implementation): the test-plan form
does not configure the extension. The extension reads
MONGODB_URIonly from the project's.envfile (never fromprocess.env, mirroring thepostgresextension), so the process-env form registers zeromongo_*tools (verified end-to-end). Use the corrected.env-based form instead:Full verification results (unconfigured / configured / full-flow, with tool lists) are recorded in
extensions/mongodb/docs/IMPLEMENTATION_PLAN.md→ "Phase 5.2 load validation — results (issue #146, 2026-09-01)".pi-loop opened and merged a pull request for this issue: #163