feat(orchestrator): add --skip-binary-integrity for system-package installs#1568
Open
yashranaway wants to merge 1 commit intodifferent-ai:devfrom
Open
feat(orchestrator): add --skip-binary-integrity for system-package installs#1568yashranaway wants to merge 1 commit intodifferent-ai:devfrom
yashranaway wants to merge 1 commit intodifferent-ai:devfrom
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
@yashranaway is attempting to deploy a commit to the Different AI Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Collaborator
|
this is complex and a dirty workaround. will keep this as is for now, and potentially merge this if theres a better fix |
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.
feat(orchestrator): add --skip-binary-integrity for system-package installs
Summary
--skip-binary-integrity(andOPENWORK_SKIP_BINARY_INTEGRITY=1env equivalent) toopenwork start,openwork serve, andopenwork daemon start.verifyBinary()short-circuits before hashing, so SHA-256 checks against the bundled-sidecar manifest are skipped.Why
System-package distributions like AUR build the orchestrator + companion binaries (
opencode,openwork-server,opencode-router) locally. Those rebuilt binaries cannot match the upstream-bundled SHA-256 manifest, soverifyBinarythrowsIntegrity check failed for ...and the orchestrator refuses to start. Today there is no documented escape hatch, so packagers either patch the source or stripversions.jsonfrom the bundle.Issue
Scope
apps/orchestrator/src/cli.tsshouldSkipBinaryIntegrity()helper next tosha256File()/verifyBinary(). ReadsOPENWORK_SKIP_BINARY_INTEGRITYand accepts1/true/yes(case-insensitive).verifyBinary()returns early when the helper reports true, before the file read + hash compare. The expected-manifest short-circuit (if (!expected) return;) is preserved unchanged.spawnRouterDaemon,runRouterDaemon,runStart) using the existingreadBool(...)pattern. When set, the entry point exportsOPENWORK_SKIP_BINARY_INTEGRITY=1to its ownprocess.env, so every downstreamverifyBinarycall in the same process picks it up.spawnRouterDaemonalso forwards--skip-binary-integrityto the spawned child orchestrator viacommandArgs.push(...), mirroring how--allow-externalis forwarded.--allow-external.apps/orchestrator/README.md--allow-externalexplaining the flag, the env var, and that it is for trusted system-package installs.Out of scope
ARCHITECTURE.md's "Predictable > clever" rule. An explicit, documented opt-out is the lowest-risk option.verifyBinarybecomes a no-op when the env var is set.Testing
Ran
pnpm --filter openwork-orchestrator typecheckbun src/cli.ts --help(verify help text placement)bun src/cli.ts start --workspace /tmp --skip-binary-integrity --allow-external --opencode-bin /nonexistentOPENWORK_SKIP_BINARY_INTEGRITY=1 bun src/cli.ts daemon start --workspace /tmp --allow-external --opencode-bin /nonexistentshouldSkipBinaryIntegrity()returnsfalsefor empty /no,truefor1/true.Result
--helplists--skip-binary-integritydirectly under--allow-externalstartand reaches the downstream binary-resolver layer (the only error is the unrelatedopencode-bin not found: /nonexistent)daemon startaccepted equivalentlyCI status
Manual verification
openwork startfails withIntegrity check failed for ....openwork start --skip-binary-integrityand confirm the orchestrator proceeds past binary resolution and reaches the normal startup path.OPENWORK_SKIP_BINARY_INTEGRITY=1 openwork startproduces the same passing result as the explicit flag.Evidence
Risk
Rollback