No sanctioned way to add a dependency: script/bootstrap is --frozen-lockfile and nothing updates the lockfile #45
Reference in New Issue
Block a user
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?
Problem
REPO_POLICIES.mdrequires that the underlying tools are never invoked directly —maketargets andscript/entrypoints only. But there is no entrypoint that can add a dependency:script/bootstraprunsyarn install --frozen-lockfile, which by definition refuses to modifyyarn.lock.script/file touches the lockfile.So adding a package requires a raw
yarn add, which the policy forbids. This surfaced concretely in PR #44, where addingpuppeteer-coreneeded exactly that; the deviation was disclosed and the result was verifiable after the fact, but it should not have required breaking a rule to do a routine thing.The Go side has the same shape: nothing runs
go getorgo mod tidy, thoughREPO_POLICIES.mdexplicitly requiresgo mod tidybefore committing.Definition of done
script/entrypoint exists for adding or updating a JS dependency, shimmed from amaketarget, which updatespackage.jsonandyarn.locktogether.go mod tidy, since policy already mandates it before every commit and nothing currently provides it.script/bootstrapkeeps--frozen-lockfile. That behaviour is correct and must not be relaxed to solve this — an install must never silently rewrite the lockfile.yarn.lockreproducible under--frozen-lockfile, with integrity hashes intact.Notes
script/layer and splits frontend steps intoscript/frontend-*. Land after it, or match whatever naming it establishes.1.0.0milestone — it is a workflow gap, not a release blocker.