Repository navigation
docs: the operator grants are a UI flow now, not a database procedure (0.3.3) - #13
Merged
Merged
Conversation
… (0.3.3) Core PR byte5ai/omadia#824 (epic #470 C16) gave the two operator grants a UI and one API route. Every place this plugin told an operator to write an INSERT by hand and restart the middleware was therefore saying something no longer true — including `setup.guide`, which is read *inside* the install wizard, on the step before the one that now asks the question. Documentation only; no plugin code changed. The artifact is re-cut because the in-ZIP README and the manifest guide are part of the ZIP. - OPERATOR-GUIDE §4 leads with the wizard's "Permissions" step and the plugin page's Permissions panel (#grants), states that both take effect in process with no middleware restart, and keeps the unified `GET|PUT /api/v1/admin/runtime/installed/:id/grants` route as the automation path alongside the preserved `…/public-paths` alias. - The pre-#824 hand INSERT moved to "Appendix A — Older cores" rather than being deleted: a plugin release outlives the core release it was written against, and no plugin-api version distinguishes them, so §4 gives the probe that does (`GET …/grants` answers 200 on a core that has it). - Skipping the SQL grant is documented as a supported outcome. This plugin reaches for the database in `activate()`, so declining leaves it `errored`. An operator who meets that without having been told to expect it reads it as a broken install. - §10 now says uninstall purges both grant tables, so a reinstall asks again instead of inheriting the previous package's database access. It said the opposite, which was true when it was written. - Same rewrite in README.md, the in-ZIP packages/plugin/README.md, and setup.guide en + de. The German copy uses the shipped UI labels (Freigeben & aktivieren, Überspringen, Übernehmen). acceptance-local.mjs now grants the way an operator does: it probes for the unified route and, when the core under test ships it, grants AFTER install over that route — the call "Grant & activate" makes — then asserts the plugin comes back `active` out of the PUT, which is the in-process re-activation actually working. Without the route it falls back to the pre-#824 pair and the report names which ran, because "granted" over two mechanisms is two different claims. A consequence: on a #824 core the install legitimately reports `errored` between configure and grant, so that is now the documented state rather than a FAIL — calling it a failure would turn the run red on the exact flow it exists to prove. §3.15 stops being permanently undecided: purged grant rows PASS, rows left behind FAIL on a core that promised to clear them and BLOCK on one that never did. compat.core is unchanged at >=1.5 <2.0. #824 changed no @omadia/plugin-api type, so there is no version to name and nothing to raise — it changed how an operator answers the permissions, not what this manifest declares. The manifest comment records that next to the C11 and C15 entries. Version 0.3.2 → 0.3.3 in packages/plugin/package.json and manifest.yaml; the package drift guard passes and the ZIP cuts at 0.3.3.
Weegy
added a commit
that referenced
this pull request
Aug 24, 2026
…16) (#17) package-lock.json recorded packages/plugin at 0.3.1 while its package.json moved to 0.3.4 across #8, #13 and #15. Nothing caught it: npm ci reconstructs the dependency tree, and a workspace member's own `version` field is not part of it, so the public lockfile claimed a version the plugin had not been for three releases. The one-command repair is the one that must not run. `npm install --package-lock-only` fixes the member entry and, in the same pass, rewrites the `../odoo-bot/middleware/packages/plugin-api` file: external from whatever core checkout sits next to this repo on the developer's disk (0.1.0 committed, 1.10.0 here) — machine state that must never land in a public lockfile. So: - Surgically bump ONLY the packages/plugin lockfile entry 0.3.1 -> 0.3.4. The external stays exactly as committed; no other member had drifted. - Add scripts/check-lock-sync.mjs: a read-only checker that asserts, for every workspace member (root included), lockfile version == package.json version, and prints the exact by-hand fix while forbidding the regeneration that leaks the local core checkout. It refuses any workspaces pattern it cannot safely expand -- outside-repo, a missing named member, or an unsupported glob -- rather than silently checking fewer members than the workspace has. - Wire it into `npm run package` (build-zip.mjs) and into CI before `npm ci`, where npm ci genuinely cannot see the drift. Add an `npm run check:lock` script. - Test packages/plugin/test/lockSync.test.ts covers discovery, drift, the external-is-never-a-member invariant, the error message, and that both wiring points are actually in place. Version stays 0.3.4 -- lockfile and tooling only, no release, no hub publish.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to core PR byte5ai/omadia#824 (epic #470 C16), named in that PR's own follow-up note: this plugin's OPERATOR-GUIDE §4.1 documented the hand-INSERT workaround and stated that core ships no surface for it. #824 makes that untrue.
Do not merge before #824 lands. Nothing here breaks on an older core — the fallback path is documented and the acceptance script still drives it — but the primary path this PR documents does not exist until #824 is on
main.Documentation only. No plugin code changed. The artifact is re-cut to 0.3.3 because two of the rewritten files ship inside the ZIP:
README.md, and the manifest'ssetup.guide, which an operator reads in the install wizard on the step before the one that now asks the question.The problem
A permission whose only "yes" is a SQL statement is not a permission an operator gave. That was the honest reading of §4.1, and it was accurate documentation of an inaccurate situation — which is worse than it sounds, because the guide also told them to restart the middleware afterwards. An operator who has to schedule a restart to find out whether a permission was needed learns to grant everything up front.
#824 replaced both halves. The docs had not caught up, and the one that matters most is not in this repo's
docs/at all:setup.guiderenders in the wizard, one step before the Permissions step now asks. A guide that says "there is no button for this yet" directly above the button is not a stale doc, it is a contradiction the operator has to resolve.What changed
Operator Guide §4 — rewritten around the UI, keeping the heading so every existing inbound anchor still resolves.
optional_requireslisted as prerequisites without checkboxes. Grant & activate vs Skip, and what Skip actually leaves behind.#grants): per-grant toggles, Apply, withdrawal, and the ledger-drift line.Three things are now stated that were not before, each because an operator who meets them cold misreads them:
errored— this plugin reaches for the database inactivate(). Without that sentence,erroredreads as a broken install rather than an unanswered question, and the recovery (grant from the panel; no reinstall) is invisible.Appendix A — Older cores keeps the hand INSERT rather than deleting it. A plugin release outlives the core release it was written against, and #824 bumped no
@omadia/plugin-apitype, so no version number distinguishes the two cores. §4 therefore gives the probe that does —GET …/grantsanswers200with adeclaredblock on a core that has it — instead of asking the operator to guess. The appendix also explains why the restart was there (ctx.services.getis synchronous, so the grant is read once while the context is built), which is what makes it obvious that #824 removed a real constraint rather than a formality.The same rewrite lands in
README.md, the in-ZIPpackages/plugin/README.md, andsetup.guideen + de. The German copy uses the labels the UI actually ships — Freigeben & aktivieren, Überspringen, Übernehmen — taken from #824'sde.json, not translated independently, so the guide and the buttons beside it agree.The acceptance script
scripts/acceptance-local.mjsgranted SQL with a directINSERTbecause there was no alternative. Now there is one, and a run that keeps using the shortcut stops testing what an operator does.It probes for the unified route and, when the core under test ships it, grants after install over that route — the same call
Grant & activatemakes — then asserts the plugin comes backactiveout of the PUT. That last assertion is the point: a 200 proves the write landed, not that the plugin came back up, and in-process re-activation is precisely the thing #824 added.Without the route it falls back to the pre-#824 pair (hand INSERT before activation,
…/public-pathsafter), and the report names which one ran — "granted" over two different mechanisms is two different claims about the system under test.Two consequences worth stating plainly:
falsefrom a 404. A missing route and a not-installed plugin both answer 404, and the probe runs before the clean slate, when the previous run's install may or may not still be there. Only a200carryingdeclaredis treated as proof. Left undecided, the run keeps the pre-C16 ordering, which is correct on every core; the post-install PUT then settles it, where a 404 is conclusive.§3.9no longer fails on the documented state. On a #824 core the harness deliberately does not pre-grant, so the install legitimately reportserroredbetween configure and grant. That is now a PASS naming the state, with the real assertion moved to the grant PUT. Calling it a FAIL would turn the run red on the exact flow it exists to prove.§3.15stops being permanently undecided (acceptance.mdleft the grant lifecycle open; C16's B6 answered it): purged rows PASS, rows left behind FAIL on a core that promised to clear them and BLOCK on one that never did.compat.coreunchangedStill
>=1.5 <2.0. #824's own gate table records noplugin-apiAPI-snapshot drift — no type changed, so there is no version to name. It changed how an operator answers the two permissions, not what this manifest declares. The manifest comment now records that next to the existing C11 and C15 entries, so the next person does not re-derive it, and because that comment block is the only place the floor's reasoning is written down.Gates
npm run typechecknpm run buildnpm testnpm run packageomadia-dev-platform-0.3.3.zip, 538,458 bytes — version drift guard passmanifest.yamlparsessetup.guideen 8,561 / de 9,202 chars, neither containingINSERTany moreExit codes were captured directly, not read off a piped tail.
Not done here
docs/ACCEPTANCE-RUN-2026-08-2*.mdare dated records of what happened on those days and are left alone. The current-state claims they contained now live in §4 and Appendix A.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.