Repository navigation
Conversation
A published install.sh now uses only the DID that render_installer baked in. ELASTOS_MAINTAINER_DID or --maintainer-did with a different DID is refused with a plain message before any other step, so nothing is downloaded or changed. The same DID is accepted and changes nothing (the launcher passes the DID it pins). The installer decides it is stamped from the baked value alone, never from a value a user can set. The unstamped repository template still takes the DID from the flag, then the environment, for the repo smokes and tests. The update-hop observer reads the new stamp line as well as the environment-default line of older frozen installers. Refs #434 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
…-root Brings in #394's one-step flock ownership proof, the subordinate lane on the same proof, and a held lock with an unreadable record counting as held (4bb19dc), through #398. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
|
CI on a143e14: Generated by Claude Code |
…-root Brings in #398's portable swapped-Runtime test (da63c23: the Linux case mocks a GNU-like mktemp instead of using the host's), and, through #397 and #395, #394's statement that the host lock proves possession, not that the holder is the gateway (13cdcad). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
|
CI on 4f501ef (run 39092040385): only Generated by Claude Code |
|
Round 5 at 4f501ef: PASS (A); independent review PASS. macOS installer suite passed twice (102 pass, 5 skip); only an empty or the same DID is accepted. |
|
Run 39092040385 attempt 2 (job 117938053446) failed before any journey ran. Generated by Claude Code |
Refs #434
Stack: this PR -> #398 -> #397 -> #395 -> #394. Base is
cursor/intel-install-gate-1297(#398 headda63c235). Head:4f501ef0, which merges #398 atda63c235(no conflicts;scripts/install-bootstrap-test.pyauto-merged). It brings #398'sda63c235: the swapped-Runtime test's Linux case mocks a GNU-likemktempinstead of using the host's (see "Mac hosts" below), and, through #397 and #395, #394's13cdcad0(the launcher contract states that the host lock proves possession, not that the holder is the gateway) and #395's630efc6d(the default-command smoke test no longer depends on port 8090). The earlier mergea143e145brought #398 at32f4abfdwith #394's4bb19dcf(one-step lock proof85f3142e; the subordinate lane andELASTOS_GATEWAY_HOST_LOCK_FDeed83a72; a held lock with an unreadable record counts as held4bb19dcf). The merges do not change this PR's diff against #398.For 0.8.1. 0.8.0 ships the stamped installer unchanged.
Needs Irzhy's security sign-off.
Decision (Anders on #398):
Decision (Sasha, round 5): keep accepting the same built-in DID; refuse any different one; no launcher change. Checked against the code on
4f501ef0, no code change was needed:install.sh:180lets an empty request or one equal to the stamp through, andinstall.sh:182always setsMAINTAINER_DID="$stamp", so the requested value never becomes the trust root. Test:test_rendered_installer_accepts_a_request_for_its_own_did(the same DID from the environment, the flag, or both; the run reaches the artifact request and printsMaintainer DID: <stamp>).install.sh:180stops withMAINTAINER_DID_BUILT_IN(install.sh:166) before any download; the check runs atinstall.sh:1306, right after argument parsing. Test:test_rendered_installer_refuses_another_did_from_environment_or_flag_before_any_download(9 cases: a different DID from the environment, from the flag, or from either while the other has the same DID; the placeholder as environment or flag;MAINTAINER_DID_STAMPset in the environment; control text;--uninstall; each exits 1 with no request and HOME unchanged).--maintainer-did <pinned DID>to the pinned stamped installer (elastos-launchersrc/main/targets/runtimeInstall.ts:314), which is the same DID, so the first case covers it.What changed
a24df995fix: a stamped installer keeps its built-in maintainer DIDscripts/install.sh:49MAINTAINER_DID_STAMP="__MAINTAINER_DID__"replacesMAINTAINER_DID="${ELASTOS_MAINTAINER_DID:-__MAINTAINER_DID__}". The stamp line reads no environment.scripts/install.sh:173-183select_maintainer_did STAMP ENV FLAG. It decides "stamped" only from the baked value: it compares it with the split placeholder"__MAINTAINER""_DID__", whichrender_installer(scripts/release-signer.py:790-801) does not replace. A user can not set the stamp. In a stamped installer, a different DID from the environment or the flag stops the run withMAINTAINER_DID_BUILT_IN(install.sh:166). That message says the DID is built in, that nothing was downloaded or changed, what to remove, and to compare theMaintainer DID:line with the README. The unstamped template still uses the flag, then the environment. The repo smokes (home-demo-local.sh,home-frontdoor-smoke.sh,local-carrier-chat-smoke.sh,local-identity-profile-smoke.sh) and the tests use that template.install.sh:1291the flag now only records the request.install.sh:1306calls the check right after argument parsing. That is before--uninstall, platform detection and any download.MAINTAINER_DIDis always the stamp (install.sh:182).--help(install.sh:123-126) and the header (install.sh:10-18) now say that only the repository copy accepts the flag and the environment.scripts/update-hop-compare.py:643-652cli_installer_metadatanow reads the new stamp line. It still reads the environment-default line of older frozen installers (such as 0.8.0), and it still requires exactly one match.75b09d4cdocs:README.md"Install from the publisher" says the published installer has the DID built in and refuses a different one before any download, so comparing theMaintainer DID:line is the check.docs/INSTALL.md"Compare and change the release signer" points to the README and does not copy it. The pinned DID and the release keys are unchanged.Tests
The new tests render the real
scripts/install.shwithrelease-signer.py'srender_installerand a test DID (install-bootstrap-test.py:95rendered_installer,:713use_rendered_installer):test_rendered_installer_installs_with_its_built_in_did_and_no_trust_flags: full--install-onlywith no trust flags.sources.jsonpins the stamped DID.test_rendered_installer_refuses_another_did_from_environment_or_flag_before_any_download: 9 cases. A different DID from the environment, from the flag, or from either one while the other has the same DID. The placeholder string given as the environment value or as the flag.MAINTAINER_DID_STAMP=<placeholder>set in the environment. Control text.--uninstall. Each case exits 1 with no request, no download, HOME byte-identical, no Runtime call, and noMaintainer DID:line. The other DID is never echoed.test_rendered_installer_accepts_a_request_for_its_own_did: the same DID from the environment, the flag, or both.test_unstamped_template_takes_its_did_from_the_flag_then_the_environment: the template still accepts both, the flag comes first, and with neither it gives the "not set" refusal.release-signer-test.pytest_rendered_public_installer_keeps_the_did_stamp_free_of_the_environment: in the rendered installer the DID appears once, on the stamp line. The split placeholder survives. There is noELASTOS_MAINTAINER_DID:-did:keydefault.update-hop-compare-test.pytest_stamped_real_installer_defaults_are_read_without_execution: now also checks the legacy frozen installer form.Negative: I replaced
install.sh:179-182, the stamped branch ofselect_maintainer_did, with the old overrideMAINTAINER_DID="${from_flag:-${from_env:-$stamp}}". All 9 refusal subtests fail. For example,Lists differ: ['https://test.invalid/release-head.json'] != [], and a full install ran with the flag-supplied DID. The wholeinstall.shfrom112e168ffails the same 9. With the fix, all pass.Run locally (
env -i PATH=/usr/local/bin:/usr/bin:/bin HOME=$HOME python3 -I -S): install-bootstrap-test 102 OK (4 skipped), release-platform-input-test 164 OK, release-signer-test 88 OK, gateway-healthz-smoke-test 26 OK (3 skipped),git diff --check,public-copy-entropy-check. update-hop-compare-test: 126 OK and 1 error,test_localhost_metadata_archive_refuses_traversal_links_modes_and_incomplete_entries(fileobj not provided, local Python 3.13 tarfile). The same error happens on112e168fwithout this change.On
a143e145: install-bootstrap-test OK (4 skipped), release-signer-test OK.On
4f501ef0: install-bootstrap-testRan 102 tests ... OK (skipped=4)with the host's GNUmktempand with an Apple-likemktempstub first onPATH; the four DID tests above pass; release-platform-input-test 164 OK and release-signer-test 88 OK (cleanenv -i ... python3 -I -S); update-hop-compare-test 127 run, the same onefileobj not providederror as before;git diff --checkclean.Mac hosts (round 4 review: the swapped-Runtime test's Linux case assumes GNU mktemp)
On this branch the same test is at
install-bootstrap-test.py:1213(before the merge). It is one test, shared with #398, not a separate copy; the merge of #398'sda63c235fixed it here. Proof without a Mac, with an Apple-likemktempstub first onPATH(no long options or-p; no template and no-tuses a per-user folder, notTMPDIR): the test file ofa143e145failsFile "scripts/install-bootstrap-test.py", line 1213 ... AssertionError: PosixPath('.../user-temp') != PosixPath('.../installer-sand...tmp'); on4f501ef0it passes, and the whole file isOK (skipped=4). No real Mac ran it, and no CI job runsinstall-bootstrap-test.pyon macOS (it runs only insource-gateonubuntu-24.04, throughrelease-platform-input-test.py).CI
4f501ef0): attempt 1 failedsource-home-linux (ubuntu-24.04)atinstalled Marketplace Get and Assistant reply(Installed journeys in source-home-linux (ubuntu-24.04) fail intermittently, on develop too #433). Attempt 2 was a failed-jobs re-run, more than a day later, that failed atdownload pinned AMD64 engine inputwithArtifact not found for name: llama-amd64-bundle. The bundle is uploaded withretention-days: 1and that job was not re-run, so the journeys never ran (installed journey acceptance is incomplete). This was not a code failure. The branch is current with Stop Intel Mac before release lookup and pin the verified head CID #398, so a merge would not change it; it needs "Re-run all jobs".Gaps
ELASTOS_PUBLISHER_GATEWAY,ELASTOS_SOURCE_CONNECT_TICKET/ELASTOS_PUBLISHER_NODE_ID(as a complete pair),ELASTOS_IPNS_NAME,ELASTOS_HEAD_CID. The DID signature stays the trust root. Whether those overrides should also go is not in Follow-ups from Sasha's 0.8.0 pre-release review (#375) #434's decision.Generated by Claude Code