Repository navigation
feat(snapshot): add Hermes managed clone broker boundary #8035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 135 commits
Commits
Show all changes
136 commits
Select commit
Hold shift + click to select a range
38329e8
feat(onboard): add managed startup profile schema
ericksoa 7f3859a
docs(onboard): clarify startup profile transport encoding
ericksoa 32561a9
fix(onboard): harden managed startup profile
ericksoa 087a9a5
chore(stack): sync PR3.2 with current main
ericksoa e1845dd
fix(onboard): close startup profile contract gaps
ericksoa 244e3e6
chore(stack): sync PR3.2 with current main
ericksoa 2403316
chore(stack): sync PR3.2 with current main
ericksoa ea5bd8a
chore(stack): sync PR3.2 with current main
ericksoa 357081a
feat(onboard): construct managed startup profiles
ericksoa 25d32e0
feat(onboard): map and coordinate startup profiles
ericksoa 094d177
feat(onboard): apply startup profiles in managed images
ericksoa 06f67e5
feat(onboard): add managed shared-state transactions
ericksoa 2a048ae
chore(stack): restack PR3.3 on merged PR3.2
ericksoa 498e521
chore(stack): restack PR3.4a on PR3.3
ericksoa 3206926
chore(stack): restack PR3.4b on PR3.4a
ericksoa f3081cc
chore(stack): restack PR3.5 on PR3.4b
ericksoa 6da5eb2
test(onboard): keep managed startup tests branchless
ericksoa 51126c4
chore(stack): carry PR3.4b guardrail fix into PR3.5
ericksoa bb7a260
chore(stack): restack PR3.4a after PR3.3 merge
ericksoa fafdbd1
chore(stack): restack PR3.4b after PR3.3 merge
ericksoa 0edd158
chore(stack): restack PR3.5 after PR3.3 merge
ericksoa b14013f
test(onboard): cover managed startup fixture CLI
ericksoa 46fbe19
feat(onboard): apply startup profiles in managed images
ericksoa b2027a9
feat(onboard): add managed shared-state transactions
ericksoa c95bdf7
fix(onboard): serialize managed startup transactions
ericksoa 3f3bdbb
feat(onboard): apply startup profiles in managed images
ericksoa 8ff8094
feat(onboard): add managed shared-state transactions
ericksoa 7d1668b
test(onboard): keep transaction races branchless
ericksoa 540494c
chore(stack): inherit PR3.4a guardrail fix
ericksoa 1463687
chore(stack): inherit PR3.4b restack
ericksoa 3a03eeb
merge: resolve conflicts with main
github-actions[bot] d97b259
chore(stack): restack PR3.5 after PR3.4a merge
ericksoa deb1581
chore(stack): refresh PR3.4b validation
ericksoa 0ad91a5
chore(stack): inherit PR3.4b validation refresh
ericksoa a0f12f1
fix(onboard): harden managed startup inputs
ericksoa 27c72f5
fix(runtime): close prior review debt
ericksoa 1c824cc
test(runtime): keep env cleanup branchless
ericksoa 5c6b3f7
fix(runtime): preserve direct image execution
ericksoa 611fdb6
fix(messaging): reject ambiguous channel identities
ericksoa 76c54d4
fix(messaging): require canonical persisted channel ids
ericksoa e41521b
chore(stack): refresh PR3.4b on current main
ericksoa bebfc6c
chore(stack): refresh PR3.5 on current PR3.4b
ericksoa 864e249
chore(stack): refresh PR3.5a on current PR3.5
ericksoa 7cf2a8d
chore(stack): refresh PR3.5b on current PR3.5a
ericksoa 5f9d97d
test(e2e): add cross-runtime foundation
ericksoa abf45b3
test(e2e): keep runtime foundation branchless
ericksoa ed479ae
refactor(runtime): unify provider bundle registry
ericksoa 005b3a7
fix(runtime): harden provider contract boundaries
ericksoa 05cf2a5
fix(runtime): fail closed on managed image cleanup
ericksoa 5c29046
fix(messaging): reject unresolved build hooks
ericksoa 534773b
fix(runtime): close provider lifecycle authority gaps
ericksoa 847e827
chore(stack): refresh PR3.5c on current PR3.5b
ericksoa 77559f7
test(runtime): keep provider parity branchless
ericksoa a2afe77
fix(e2e): harden runtime foundation contracts
ericksoa 13932b9
chore(stack): refresh PR3.4b on current main
ericksoa 5111410
chore(stack): refresh PR3.5 on current PR3.4b
ericksoa 7d51947
chore(stack): refresh PR3.5a on current PR3.5
ericksoa 004b060
test(e2e): verify fixture profiles stay unregistered
ericksoa 771f48c
chore(stack): refresh PR3.5b on current PR3.5a
ericksoa c67afd3
chore(stack): refresh PR3.5c on current PR3.5b
ericksoa 4788d28
test(e2e): expose runtime profile registration state
ericksoa 64f562f
fix(runtime): preserve unproven cleanup authority
ericksoa 15eef1b
chore(stack): refresh PR3.6 on repaired base
ericksoa d73f13a
test(runtime): cover unknown provider doctor result
ericksoa 8f8bcd5
test(runtime): prove provider recovery boundaries
ericksoa f77bff8
fix(runtime): fail closed on retained cleanup ownership
ericksoa bf2fd19
test(rebuild): type cleanup ownership receipt
ericksoa 4316a18
fix(runtime): prove cleanup authority before deletion
ericksoa 062d66b
test(snapshot): mock destructive cleanup authority
ericksoa 75730cf
test(runtime): prove cleanup planning is inert
ericksoa 0b21b79
feat(rebuild): add atomic managed workload replacement
ericksoa 438f79f
fix(rebuild): fail closed across authority cutover
ericksoa 412d69d
docs(rebuild): define deferred recovery ownership
ericksoa cfe84cd
fix(rebuild): bind retained workload authority
ericksoa 827f545
test(rebuild): keep failure matrices linear
ericksoa add3965
test(rebuild): cover invalid provider artifacts
ericksoa 9bbf75d
fix(rebuild): address review feedback
ericksoa 8212bf9
merge: resolve conflicts with main
github-actions[bot] 4960f4d
chore(stack): refresh managed rebuild on current main
ericksoa bf94633
feat(snapshot): preserve managed runtime authority
ericksoa 3a4321d
fix(snapshot): enforce managed authority boundaries
ericksoa 8b19581
feat(snapshot): prepare immutable managed clone handoff
ericksoa 1a91ef2
test(snapshot): keep provider authority cases linear
ericksoa 410d4c9
chore(stack): refresh clone contract on PR3.8
ericksoa fabad32
test(snapshot): keep clone authority cases linear
ericksoa 25aa304
feat(snapshot): add managed clone provider transaction
ericksoa 6d4d858
test(snapshot): satisfy provider transaction CLI typings
ericksoa 94cb164
chore(stack): refresh provider transaction on PR3.9A
ericksoa cbecf7b
feat(snapshot): stage Hermes clone broker activation
ericksoa 888e2f9
test(snapshot): satisfy Hermes broker CLI typings
ericksoa c176a4f
fix(snapshot): use shared immutable boundary
ericksoa 88ff07b
fix(snapshot): keep clone transaction dormant
ericksoa 5429f52
chore(stack): refresh Hermes clone broker on PR3.9B
ericksoa 101e408
test(snapshot): satisfy Hermes broker growth guard
ericksoa 844bfb6
fix(snapshot): pin files during authority hashing
ericksoa aeddd24
chore(stack): refresh clone handoff on snapshot security fix
ericksoa f7068d0
chore(stack): refresh provider transaction on clone handoff
ericksoa 0711807
chore(stack): refresh Hermes broker on provider transaction
ericksoa ed60882
fix(snapshot): address restore review findings
ericksoa 7c823d4
fix(snapshot): address clone handoff review findings
ericksoa e962454
merge: update PR3.8 review fixes
ericksoa c2e6f06
fix(snapshot): address provider transaction review
ericksoa 9e64898
docs(snapshot): clarify legacy restore retention
ericksoa 738e680
merge: refresh PR3.8 documentation
ericksoa d7d4adc
merge: refresh clone handoff contract
ericksoa 380925a
fix(hermes): address broker transaction review
ericksoa ffacfb3
merge: refresh Hermes broker on provider transaction
ericksoa 0013772
test(messaging): keep staged channel fixture canonical
ericksoa 61aa6d6
merge(stack): refresh clone handoff fixture
ericksoa 4bb2b58
merge(stack): refresh managed clone provider
ericksoa e97ecce
merge(stack): refresh managed workload rebuild parity
ericksoa 6b2c464
merge(stack): refresh managed snapshot parity
ericksoa 91c807c
merge(stack): refresh managed clone handoff contract
ericksoa 8ca5867
merge(stack): refresh managed clone provider transaction
ericksoa 2faa95d
merge(stack): refresh Hermes managed clone broker
ericksoa 362a70c
chore(stack): refresh managed workload rebuild parity on current main
ericksoa b2374ee
chore(stack): refresh managed snapshot parity parent
ericksoa e09ce8a
chore(stack): refresh managed clone handoff parent
ericksoa aeeb6dd
chore(stack): refresh managed clone provider parent
ericksoa 968c795
chore(stack): refresh Hermes clone broker parent
ericksoa ca85ca7
fix(hermes): preserve broker write ownership
ericksoa b349b98
merge: resolve conflicts with main
github-actions[bot] 33d1756
merge(stack): restack #8031 onto current main
ericksoa 65f4d68
merge(stack): restack #8032 onto #8031
ericksoa 380d885
merge(stack): restack #8034 onto #8032
ericksoa 6c7f81d
merge(stack): restack #8035 onto #8034
ericksoa 7097017
test(hermes): assert clone cleanup writes no state
ericksoa c1fd385
chore(stack): refresh Hermes review fix on current parent
ericksoa 8628b8a
fix(hermes): harden broker control recovery
ericksoa d7cb7f7
test(hermes): rely on owned child cleanup
ericksoa a41d7e3
merge: resolve conflicts with main
github-actions[bot] 4699ab7
merge(stack): append final #8032 ancestry
ericksoa 4824fce
merge(stack): append final #8034 ancestry
ericksoa 1686229
feat(snapshot): add Hermes managed clone broker boundary
ericksoa 9352b77
merge(stack): preserve PR #8035 ancestry on current main
ericksoa f64c4be
fix(hermes): type-check clone broker host contracts
ericksoa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| // @ts-nocheck | ||
| // SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| /** | ||
| * Process-memory-only refresh credentials for the shared Hermes tool broker. | ||
| * | ||
| * Durable state carries only hashes. Each sandbox identity owns one in-memory | ||
| * value, so adding or removing a clone cannot replace another sandbox's | ||
| * credential even when every sandbox shares the same broker listener. | ||
| */ | ||
| class RuntimeRefreshCredentialStore { | ||
| constructor(hashCredential) { | ||
| this.hashCredential = hashCredential; | ||
| this.credentials = new Map(); | ||
| } | ||
|
|
||
| register(state, refreshToken) { | ||
| const sandbox = String(state?.sandbox || "").trim(); | ||
| const expectedHash = String(state?.refresh_token_sha256 || "").trim(); | ||
| const normalized = String(refreshToken || "").trim(); | ||
| if (!sandbox || !expectedHash || !normalized) return false; | ||
| if (this.hashCredential(normalized) !== expectedHash) return false; | ||
| // Keep a distinct entry for every successful write. Rollback callbacks | ||
| // compare the entry identity so a later write of the same token still wins. | ||
| this.credentials.set(sandbox, { refreshToken: normalized }); | ||
| return true; | ||
| } | ||
|
|
||
| resolve(state) { | ||
| const sandbox = String(state?.sandbox || "").trim(); | ||
| const expectedHash = String(state?.refresh_token_sha256 || "").trim(); | ||
| const entry = this.credentials.get(sandbox); | ||
| if (!sandbox || !expectedHash || !entry) return null; | ||
| if (this.hashCredential(entry.refreshToken) !== expectedHash) { | ||
| this.credentials.delete(sandbox); | ||
| return null; | ||
| } | ||
| return entry.refreshToken; | ||
| } | ||
|
|
||
| rotate(state, nextRefreshToken) { | ||
| return this.register(state, nextRefreshToken); | ||
| } | ||
|
|
||
| replace(state, nextRefreshToken) { | ||
| const sandbox = String(state?.sandbox || "").trim(); | ||
| if (!sandbox) return null; | ||
| const hadPrevious = this.credentials.has(sandbox); | ||
| const previous = this.credentials.get(sandbox); | ||
| if (!this.register(state, nextRefreshToken)) return null; | ||
| const replacement = this.credentials.get(sandbox); | ||
| let pending = true; | ||
| return () => { | ||
| if (!pending) return false; | ||
| pending = false; | ||
| if (this.credentials.get(sandbox) !== replacement) return false; | ||
| if (hadPrevious) this.credentials.set(sandbox, previous); | ||
| else this.credentials.delete(sandbox); | ||
| return true; | ||
| }; | ||
| } | ||
|
|
||
| unregister(sandboxName) { | ||
| const sandbox = String(sandboxName || "").trim(); | ||
| return sandbox ? this.credentials.delete(sandbox) : false; | ||
| } | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| } | ||
|
|
||
| module.exports = { RuntimeRefreshCredentialStore }; | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.