issue-133: Initialize the extensions/mongodb package (package.json, deps, bun.lock) #152

Merged
david merged 3 commits from feature/issue-133/initialize-the-extensions-mongodb-package-package into main 2026-08-31 23:24:08 +00:00
Owner

133: Initialize the extensions/mongodb package (package.json, deps, bun.lock)

Implements 133.

This pull request was generated automatically by pi-loop and opened as a
Draft for human review. Do not merge without reviewing the changes.

Generated in 7m 45s.

Review findings

Let me examine the sibling extensions and project conventions more closely.The victorialogs precedent is clear: the scaffold commit (issue 64) included tsconfig.json, check script, typescript devDependency, README.md stub, src/.gitkeep, and a scaffold test asserting pi.extensions — while root-manifest wiring was a separate later issue (#103) landed after index.ts existed. That confirms the correct remediation shape for the mongodb scaffold.

Let me apply the fixes:Now update the implementation plan to mark Phase 0 progress and explicitly defer 0.4:Now install the new devDependency to sync bun.lock:All gates pass. Let me verify the final working-tree diff:All fixes are in place and all gates pass. Here is the annotated findings document.


Review Findings — 133

Summary

Gates re-run after remediation: bun test in extensions/mongodbPASS (1 real test, up from the comment-only placeholder); bun run check (tsc --noEmit) — PASS (new gate, exit 0); bun install --frozen-lockfile in extensions/mongodbPASS (lock in sync, 148 packages after adding typescript); root npm testPASS (57/57). No lint tooling exists in the repo (unchanged).

Fixed: completed Phase 0 items 0.2 (tsconfig + check + typescript) and 0.3 (README stub, src/ + src/tools/ via .gitkeep), added description/license, replaced the comment-only placeholder test with a real scaffold test (asserts the pi.extensions entry, mirroring the victorialogs scaffold test), and made Phase 0 item 0.4 explicitly deferred/tracked in IMPLEMENTATION_PLAN.md — root-manifest wiring is a separate milestone in this repo (the victorialogs extension was wired into the root manifest in its own later issue #103, after index.ts existed), so registering extensions/mongodb/index.ts now would create exactly the broken load path the Medium finding warns about.

Remains: the commit-message deviation (cannot amend — this stage performs no commit/stage operations; the squash-merge PR flow will normalize it to issue-133: … per AGENTS.md) and the optional install-bloat trade-off (intentional per DESIGN.md).

Critical

  • No critical findings.

High

  • package.json:12 — Plan Phase 0 item 0.4 is unmet: extensions/mongodb/index.ts was not added to the root pi.extensions array and mongodb was not added to the root dependencies. As a result the initialized package is invisible to the runtime: npm run install:local will not install/hoist the mongodb driver and pi will never load mongo_* tools. Suggested fix: add "extensions/mongodb/index.ts" to root package.json pi.extensions and mongodb to root dependencies — or, if this issue is strictly scoped to the subpackage, mark 0.4 as explicitly deferred to a later milestone in extensions/mongodb/docs/IMPLEMENTATION_PLAN.md so the gap is intentional and tracked.

Medium

  • extensions/mongodb/package.json:10 — Plan Phase 0 item 0.2 is unmet: no tsconfig.json and no typescript devDependency, so the Phase 4 validation gate (tsc --noEmit clean) is not runnable from this package (sibling victorialogs ships both, plus a check script). Suggested fix: add tsconfig.json mirroring extensions/victorialogs/tsconfig.json (module esnext, moduleResolution bundler, types ["bun"]) and add "check": "tsc --noEmit" + typescript to devDependencies.
  • extensions/mongodb/package.json:16 — pi.extensions points at ./index.ts, which does not exist until Phase 4. Latent broken load path: completing the High finding above (root-manifest registration) or installing this subpackage standalone would make pi fail to load the extension. Suggested fix: keep the entry but block root registration on index.ts landing (or add a stub index.ts that registers zero tools, matching the unconfigured design), and add a test asserting the package loads.

Medium

  • (no additional findings)

Low

  • extensions/mongodb/package.json:1 — Plan Phase 0 item 0.3 is unmet: src//src/tools/ structure and README.md stub were not created. Suggested fix: create src/ and src/tools/ dirs plus a README.md stub, or mark 0.3 deferred in the plan.
  • extensions/mongodb/package.json:1 — Commit message (5957925: "133: Initialize …") deviates from the AGENTS.md convention issue-<N>: <summary>; prior commits use issue-131: …. Suggested fix: amend the commit to issue-133: Initialize the extensions/mongodb package (package.json, deps, bun.lock).
  • extensions/mongodb/package.json:2 — Missing description/license fields; sibling victorialogs and forgejo package.jsons include them. Suggested fix: add a one-line description and "license": "ISC".
  • extensions/mongodb/package.json:11 — The @earendil-works/pi-coding-agent devDependency pulls the entire pi runtime into the lock (147 packages: @anthropic-ai/sdk, @aws-sdk/*, @google/genai, openai, native @silvia-odwyer/photon-node). Intentional per DESIGN.md, but heavier than the postgres sibling (types-only via @types/bun). Suggested fix: optional — consider pinning to the package's own .d.ts types or a narrower types package if install bloat matters.

Documentation

Updated files:

  • README.md
## 133: Initialize the extensions/mongodb package (package.json, deps, bun.lock) Implements [133](https://git.excelera.net/david/pi-extensions-and-skills/issues/133). > This pull request was generated automatically by pi-loop and opened as a > **Draft** for human review. Do not merge without reviewing the changes. Generated in 7m 45s. ## Review findings Let me examine the sibling extensions and project conventions more closely.The victorialogs precedent is clear: the scaffold commit (issue 64) included `tsconfig.json`, `check` script, `typescript` devDependency, `README.md` stub, `src/.gitkeep`, and a scaffold test asserting `pi.extensions` — while root-manifest wiring was a **separate later issue** (#103) landed after `index.ts` existed. That confirms the correct remediation shape for the mongodb scaffold. Let me apply the fixes:Now update the implementation plan to mark Phase 0 progress and explicitly defer 0.4:Now install the new devDependency to sync `bun.lock`:All gates pass. Let me verify the final working-tree diff:All fixes are in place and all gates pass. Here is the annotated findings document. --- # Review Findings — 133 ## Summary Gates re-run after remediation: `bun test` in `extensions/mongodb` — **PASS** (1 real test, up from the comment-only placeholder); `bun run check` (`tsc --noEmit`) — **PASS** (new gate, exit 0); `bun install --frozen-lockfile` in `extensions/mongodb` — **PASS** (lock in sync, 148 packages after adding `typescript`); root `npm test` — **PASS** (57/57). No lint tooling exists in the repo (unchanged). Fixed: completed Phase 0 items 0.2 (tsconfig + `check` + `typescript`) and 0.3 (README stub, `src/` + `src/tools/` via `.gitkeep`), added `description`/`license`, replaced the comment-only placeholder test with a real scaffold test (asserts the `pi.extensions` entry, mirroring the `victorialogs` scaffold test), and made Phase 0 item 0.4 explicitly deferred/tracked in `IMPLEMENTATION_PLAN.md` — root-manifest wiring is a separate milestone in this repo (the `victorialogs` extension was wired into the root manifest in its own later issue #103, after `index.ts` existed), so registering `extensions/mongodb/index.ts` now would create exactly the broken load path the Medium finding warns about. Remains: the commit-message deviation (cannot amend — this stage performs no commit/stage operations; the squash-merge PR flow will normalize it to `issue-133: …` per AGENTS.md) and the optional install-bloat trade-off (intentional per DESIGN.md). ## Critical - No critical findings. ## High - [x] package.json:12 — Plan Phase 0 item 0.4 is unmet: `extensions/mongodb/index.ts` was not added to the root `pi.extensions` array and `mongodb` was not added to the root `dependencies`. As a result the initialized package is invisible to the runtime: `npm run install:local` will not install/hoist the mongodb driver and pi will never load `mongo_*` tools. Suggested fix: add `"extensions/mongodb/index.ts"` to root `package.json` `pi.extensions` and `mongodb` to root `dependencies` — or, if this issue is strictly scoped to the subpackage, mark 0.4 as explicitly deferred to a later milestone in `extensions/mongodb/docs/IMPLEMENTATION_PLAN.md` so the gap is intentional and tracked. ## Medium - [x] extensions/mongodb/package.json:10 — Plan Phase 0 item 0.2 is unmet: no `tsconfig.json` and no `typescript` devDependency, so the Phase 4 validation gate (`tsc --noEmit` clean) is not runnable from this package (sibling `victorialogs` ships both, plus a `check` script). Suggested fix: add `tsconfig.json` mirroring `extensions/victorialogs/tsconfig.json` (module esnext, moduleResolution bundler, types `["bun"]`) and add `"check": "tsc --noEmit"` + `typescript` to devDependencies. - [x] extensions/mongodb/package.json:16 — `pi.extensions` points at `./index.ts`, which does not exist until Phase 4. Latent broken load path: completing the High finding above (root-manifest registration) or installing this subpackage standalone would make pi fail to load the extension. Suggested fix: keep the entry but block root registration on `index.ts` landing (or add a stub `index.ts` that registers zero tools, matching the unconfigured design), and add a test asserting the package loads. ## Medium - (no additional findings) ## Low - [x] extensions/mongodb/package.json:1 — Plan Phase 0 item 0.3 is unmet: `src/`/`src/tools/` structure and `README.md` stub were not created. Suggested fix: create `src/` and `src/tools/` dirs plus a `README.md` stub, or mark 0.3 deferred in the plan. - [ ] extensions/mongodb/package.json:1 — Commit message (`5957925`: "133: Initialize …") deviates from the AGENTS.md convention `issue-<N>: <summary>`; prior commits use `issue-131: …`. Suggested fix: amend the commit to `issue-133: Initialize the extensions/mongodb package (package.json, deps, bun.lock)`. - [x] extensions/mongodb/package.json:2 — Missing `description`/`license` fields; sibling `victorialogs` and `forgejo` package.jsons include them. Suggested fix: add a one-line `description` and `"license": "ISC"`. - [ ] extensions/mongodb/package.json:11 — The `@earendil-works/pi-coding-agent` devDependency pulls the entire pi runtime into the lock (147 packages: `@anthropic-ai/sdk`, `@aws-sdk/*`, `@google/genai`, `openai`, native `@silvia-odwyer/photon-node`). Intentional per DESIGN.md, but heavier than the `postgres` sibling (types-only via `@types/bun`). Suggested fix: optional — consider pinning to the package's own `.d.ts` types or a narrower types package if install bloat matters. ## Documentation Updated files: - README.md
david merged commit dbd3ee7fa8 into main 2026-08-31 23:24:08 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
david/pi-extensions-and-skills!152
No description provided.