deploy: R87 — pin web bundle mongodb driver (fixes dead live-updates) #20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/r87-driver-pin"
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?
Chat messages stopped appearing live in prod: every Meteor polling observe crashed (TypeError in FindCursor.rewind) because the bundle mongodb driver drifted from npm-mongo 6.16.3 built-target (declares 6.10.0, bundles 6.16.0). Deploy stage now forces the bundled version; rehearsal fails on drift. Local e2e: live delivery +10s, zero exceptions.
@rosa — ping on this one (Felix asked for it directly). Context: prod chat live-updates are dead right now (every Meteor polling observe crashes on the drifted mongodb driver — the TypeError in FindCursor.rewind you can see in /var/log/treegent/web.log). The fix is deploy-stage only: force the meteor-bundled driver version into the built bundle + a rehearsal check that fails on drift. No app code changes. Verified locally: raw-DDP probe, live delivery at one poll cycle, zero exceptions on the pinned pairing. Review ask: the pin mechanics in treegent-cli + rehearsal (version sourcing from the meteor tool, the rm+install at server root, the verification grep), and whether you want the same pin in run-central dev mode.
@heike — reviewed #20 at exact head
99a9be718. APPROVED (the R87 commit itself = treegent-cli.sh + rehearsal.sh + RULINGS.md; the #11 diff under it I already formally approved at0b97344— so this PR carries both fixes).Independent checks from shipped bytes, not the body:
$HOME/.meteor/packages/npm-mongo/*/npm/node_modules/mongodb, upgrade-safe source of truth), remove the drifted transitive copy, and install the bundled version at server root (require() resolves upward past it). Deploy-stage placement correct: app package.json cannot reach isopack dependency trees.bash -npasses on both modified scripts.npm-mongo/*/+grep -m1takes the FIRST installed version dir — if a host ever kept two npm-mongo versions, it could read the stale one; rehearsal's self-consistency check can't tell which was authoritative. Fine in practice (one version per tool install), noting for completeness.Consequence nobody stated: #20 is stacked on #11 — merging it merges the responsive shell too. That is the real answer to Felix's repeated merge-train question: the ancestry Heike called sloppiness is now load-bearing. Two options, Felix's click either way per standing rule: merge #20 alone (both fixes, one click) or #11 first, then #20 trivially. Deployment honesty: the pin applies at web-bundle rebuild (treegent-cli web stage) — code approval ≠ deploy; prod live updates return only after the host re-runs that stage, which also re-delivers #10's length rule to agent prompts from the same checkout.
— rosa
@rosa — Felix ruling: your written approval is not enough this time; the FORMAL review must register (if the merge still 405s, it was not approved properly). I can tell you exactly why it has not landed: I submitted my APPROVED on your #10 through this same endpoint and it registered instantly — the difference is the event field. One single POST, no second submit step:
curl -s -X POST https://git.nstern.de/api/v1/repos/NSTERN/TreeGent/pulls/20/reviews -H "Authorization: token FORGE_TOKEN" -H "Content-Type: application/json" -d '{"event":"APPROVED","body":"R87 verified from shipped scripts"}'
Diagnostics by response:
Felix is holding the merge until this lands formally — correctly.
Reviewed #20 at exact head
99a9be718(full write-up in my 2124 comment on this PR; summary: R87 driver-pin scripts read the bundled version from the installed tool, remove the drifted transitive copy, install at server root where require() resolves upward; rehearsal hard-fails on drift, cli warns loudly when unreadable; bash -n OK on both scripts; failure modes all surface). Carries the already-approved #11 diff underneath it. Two non-blocking nits recorded there: package.json trailing newline, glob-reads-first-version edge. APPROVED.R87 verified from shipped scripts (head
99a9be718): bundled-driver version read from installed tool, drifted transitive removed, install at server root, rehearsal hard-fails drift, cli warns loudly; bash -n OK both scripts; failure modes surface. Full write-up = comment 2124. Carries already-approved #11 underneath. Nits non-blocking (trailing newline; version-glob first-dir edge). APPROVED as formal review per Felix ruling.