Skip to content

Commit 9ba46c2

Browse files
Pigbibiclaude
andauthored
ci(console): register S2 desk N1 release source c0ac584 (#1166) (#1167)
Register the merged #1166 Desk N1 live-flip commit as a dedicated, fail-closed reviewed-main release source in the console deploy workflow. Prior source definitions, including the S1 1618b24 pins, are unchanged. - Selector: exact source, sole parent af897f8, tree a7b327c, v2 map blob 281002e and Worker blob bbe906c; the source tree must also carry the reviewed #1126 reader test f590e43, so nothing is composed. main ref, CONTROL equal to the run SHA and distinct from SOURCE, SOURCE an ancestor of CONTROL; receiver checks retained; no secret or profile sync. - Overlay: the selected head must match its tree and pinned map after rebuild, bound to this source input, with no staged, unstaged or untracked delta. - Publisher: current reviewed-main path (active version as sole configuration donor, version-pinned upload, separate concurrency witness, module/migration/configuration checks, 100% activation). - Tests: real-Git identity, map generation and N1 Worker routes; accepted source, mode, ref and unknown-source rejection; wrong parent/tree/map/Worker/reader test/ancestry/CONTROL; no cross-acceptance with 1618b24; overlay tampering and publisher witness/drift cases. Co-authored-by: Claude Code <noreply@anthropic.com>
1 parent c0ac584 commit 9ba46c2

2 files changed

Lines changed: 144 additions & 5 deletions

File tree

‎.github/workflows/deploy-strategy-switch-console.yml‎

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,28 @@ jobs:
11231123
&& [ "$(git rev-parse 'HEAD^{tree}')" = "$expected_tree" ] || exit 2
11241124
exit 0
11251125
fi
1126+
# S2 Desk N1 read-only release source (#1166): exact source, sole parent, tree,
1127+
# map and Worker from main history. Its tree carries the five N1 read routes and
1128+
# the reviewed #1126 Binance reader test, so nothing is composed onto it.
1129+
if [ "$RELEASE_SOURCE_SHA" = "c0ac5848b8af983d4f857e465c6ff64009b0957f" ]; then
1130+
[ "$GITHUB_REF" = "refs/heads/main" ] && [ "$frontend_mode" = true ] \
1131+
&& [ "$SYNC_SECRETS" = false ] && [ "$SYNC_STRATEGY_PROFILES" = false ] \
1132+
&& [ "$SKIP_BINANCE_RECEIVER_CHECKS" = false ] || exit 2
1133+
control_sha="$(git rev-parse HEAD)"
1134+
[ "$control_sha" = "$GITHUB_SHA" ] && [ "$control_sha" != "$RELEASE_SOURCE_SHA" ] || exit 2
1135+
git cat-file -e "${RELEASE_SOURCE_SHA}^{commit}"
1136+
git merge-base --is-ancestor "$RELEASE_SOURCE_SHA" "$control_sha"
1137+
[ "$(git rev-parse "${RELEASE_SOURCE_SHA}^@")" = "af897f8b215c5e46f436888179be4be26d467679" ] || exit 2
1138+
expected_tree="a7b327c0f41296ba2e92d08371bb84920fe3c84f"
1139+
[ "$(git rev-parse "${RELEASE_SOURCE_SHA}^{tree}")" = "$expected_tree" ] || exit 2
1140+
[ "$(git rev-parse "${RELEASE_SOURCE_SHA}:web/strategy-switch-console/v2_asset_map.js")" = "281002eae61aac3d12ccdf6a00c6a084964f4604" ] || exit 2
1141+
[ "$(git rev-parse "${RELEASE_SOURCE_SHA}:web/strategy-switch-console/worker.js")" = "bbe906c52ebbbf719b19103c7f808c5bde5f294c" ] \
1142+
&& [ "$(git rev-parse "${RELEASE_SOURCE_SHA}:tests/binance_account_facts_validation.mjs")" = "f590e43dd71274e761c505cd375b05b7da0b9756" ] || exit 2
1143+
git -c advice.detachedHead=false checkout --detach "$RELEASE_SOURCE_SHA"
1144+
[ "$(git rev-parse HEAD)" = "$RELEASE_SOURCE_SHA" ] \
1145+
&& [ "$(git rev-parse 'HEAD^{tree}')" = "$expected_tree" ] || exit 2
1146+
exit 0
1147+
fi
11261148
# S1 Desk default-entry release source (#1133): exact source, sole parent, tree
11271149
# and map from main history. Its tree already carries the reviewed #1126 Binance
11281150
# wallet reader, so the Worker and test blobs are pinned and nothing is composed.
@@ -1294,6 +1316,7 @@ jobs:
12941316
console_source="6f9b84e6192b68bac1627337fb4e633e178fcee3"
12951317
s1_source="aa05d670f9a51a52c91f142beae65888f7b110fc"
12961318
desk_entry_source="1618b2488698804e8bedc19d3509694e4c306a75"
1319+
desk_n1_source="c0ac5848b8af983d4f857e465c6ff64009b0957f"
12971320
head_sha="$(git rev-parse HEAD)"
12981321
if [ "${RELEASE_SOURCE_SHA:-}" = "866388696a6bad7d1b88a76a3ab5957c7958b3bf" ]; then
12991322
[ "$GITHUB_REF" = "refs/heads/main" ] && [ "$head_sha" = "$console_source" ] || exit 2
@@ -1306,9 +1329,15 @@ jobs:
13061329
git diff --quiet
13071330
exit 0
13081331
fi
1309-
if [ "$head_sha" = "$desk_entry_source" ] || [ "$head_sha" = "$s1_source" ] || [ "$head_sha" = "$console_source" ] || [ "$head_sha" = "$reviewed_main" ] || [ "$head_sha" = "$historical_reviewed_main" ] || [ "$head_sha" = "$older_reviewed_main" ]; then
1332+
if [ "$head_sha" = "$desk_n1_source" ] || [ "$head_sha" = "$desk_entry_source" ] || [ "$head_sha" = "$s1_source" ] || [ "$head_sha" = "$console_source" ] || [ "$head_sha" = "$reviewed_main" ] || [ "$head_sha" = "$historical_reviewed_main" ] || [ "$head_sha" = "$older_reviewed_main" ]; then
13101333
[ "$GITHUB_REF" = "refs/heads/main" ] || exit 2
1311-
if [ "$head_sha" = "$desk_entry_source" ]; then
1334+
if [ "$head_sha" = "$desk_n1_source" ]; then
1335+
# The S2 Desk N1 tree supplies the Worker and the built frontend map unchanged;
1336+
# the rebuilt map must equal the pinned blob, with no delta below.
1337+
[ "${RELEASE_SOURCE_SHA:-}" = "$desk_n1_source" ] || exit 2
1338+
[ "$(git rev-parse 'HEAD^{tree}')" = "a7b327c0f41296ba2e92d08371bb84920fe3c84f" ] || exit 2
1339+
[ "$(git hash-object web/strategy-switch-console/v2_asset_map.js)" = "281002eae61aac3d12ccdf6a00c6a084964f4604" ] || exit 2
1340+
elif [ "$head_sha" = "$desk_entry_source" ]; then
13121341
# The Desk default-entry tree supplies the Worker and the built frontend map
13131342
# unchanged; the rebuilt map must equal the pinned blob, with no delta below.
13141343
[ "${RELEASE_SOURCE_SHA:-}" = "$desk_entry_source" ] || exit 2
@@ -1839,7 +1868,8 @@ jobs:
18391868
const currentReviewedMain = binanceWalletRelease || binanceDigestRelease || process.env.RELEASE_SOURCE_SHA === 'dd63b3c8b73b588ce411316d904efd26f2c4f382'
18401869
|| process.env.RELEASE_SOURCE_SHA === '6f9b84e6192b68bac1627337fb4e633e178fcee3'
18411870
|| process.env.RELEASE_SOURCE_SHA === 'aa05d670f9a51a52c91f142beae65888f7b110fc'
1842-
|| process.env.RELEASE_SOURCE_SHA === '1618b2488698804e8bedc19d3509694e4c306a75';
1871+
|| process.env.RELEASE_SOURCE_SHA === '1618b2488698804e8bedc19d3509694e4c306a75'
1872+
|| process.env.RELEASE_SOURCE_SHA === 'c0ac5848b8af983d4f857e465c6ff64009b0957f';
18431873
const reviewedMain = currentReviewedMain
18441874
|| process.env.RELEASE_SOURCE_SHA === '084ba4281cfff3304cf226ce511a2fc0a6b67b08'
18451875
|| process.env.RELEASE_SOURCE_SHA === 'c1b737d6e721eb9fe71a12c613fbb49d3fa51563';

0 commit comments

Comments
 (0)