feat: embed branded DIG icon in dig-node/dign/dig-wallet (#2917) - #589
feat: embed branded DIG icon in dig-node/dign/dig-wallet (#2917)#589MichaelTaylor3d wants to merge 4 commits into
Conversation
Adds the byte-pinned dig.ico (10 frames), the Windows .rc referencing it at ordinal 1, and the sha256 drift gate script. Refs #2917.
Adds a Windows build-dependency on embed-resource 3.x to dig-node-service and dig-wallet and compiles assets/dig.rc into a linked resource. dig-node-service uses embed_resource::compile_for scoped to ["dig-node", "dign"] so the fake_beacon_cli test fixture stays unbranded; dig-wallet has a single bin so the unscoped compile() is used. The pre-existing GET /version git-sha build.rs logic in dig-node-service is untouched, only extended. Also adds the icon-asset CI job (sha256 pin) to ci.yml. Refs #2917.
--locked builds (build .deb, Clippy, Test + coverage) failed CI because the lockfile was not regenerated when embed-resource was added as a Windows build-dependency (dig_ecosystem#2917); the lockfile is cross-platform and not gated by cfg(windows). Only embed-resource and its own deps (toml, vswhom, vswhom-sys, winreg) are added -- diffed against origin/develop, nothing existing moved.
The `[target.'cfg(windows)'.build-dependencies]` header for embed-resource was inserted in the MIDDLE of the existing `[target.'cfg(windows)'.dependencies]` table. In TOML a table header ends the preceding table, so every entry below it -- windows-sys among them -- silently stopped being a runtime dependency and became a build dependency, and the lib failed to compile with nine copies of `cannot find module or crate windows_sys` on the windows-x64 msi job. Moving the block to the end of the file leaves the runtime table whole. Cargo.lock is unchanged by this move (same package, same version, different section), which is why no lockfile review would have caught the defect. Refs #2917
|
gate-sec-dig-node — IN PROGRESS finding (not the verdict) Item 3 (build-graph confinement) partially fails. New packages ARE confined to exactly 5 ( But diffing the resolved
This is the exact "unrelated windows-sys/socket2 major bump" class the PR history describes |
|
gate-sec-dig-node — VERDICT: CHANGES-REQUIRED Head SHA audited: 1. Elevation posture — CLEAR. No 2. Dependency-classification repair — CLEAR. Fetched 3. Build-graph confinement — CHANGES-REQUIRED (posted above). New package additions are 4. Vendored icon blob — CLEAR. Scope audited: all 9 changed files in PR #589 ( Not covered: an actual Windows build/link to inspect Filesystem note: Read-only throughout. Did not touch |
Orchestrator decision on the security gate's CHANGES-REQUIRED: the widened lockfile is ACCEPTED, explicitly, and the dependency change is being filed separatelyThe security gate was right to stop this, and the check it used is now the standard for the rest of the rollout. Recording the decision and the evidence it rests on, because "we looked and it was fine" is not something a future reader can audit. The finding standsAdding reaching Why it is being accepted rather than re-pinnedA lane was sent to determine whether a minimal lock was achievable, with instructions to report honestly if it was not rather than force it. The result is decisive:
So this PR did not drag anything in. Note also that both What is NOT being swept under the iconThe consolidation is a real change to what the transport stack compiles against, and it does not belong to a packaging ticket even when it is unavoidable inside one. It is being filed as its own ticket so it is visible, attributable, and re-checkable — rather than discovered a month from now by someone bisecting a connectivity regression into a PR titled "embed the branded DIG icon". The gate's other three areas were CLEAR: elevation posture (no manifest anywhere, before or after; |
MichaelTaylor3d
left a comment
There was a problem hiding this comment.
Gate review — PASS (with one note) at head 6c1a3287d1ee6ddd5790f0a551cfb5e6c4d236bb
Fresh-context static review. No cargo build performed here — the orchestrator is
supplying the PE-resource-verifier output (verify_pe_icon.py against real
dig-node/dign/dig-wallet binaries, including proof the fake_beacon_cli
exclusion holds) separately on this PR. That artifact-level evidence is not
yet posted as of this review; treat this PASS as conditional on it landing
before merge.
Checked, one by one
- Non-vacuous gate — mutation-proved off-PR: fetched
scripts/check-icon.sh
and the committedassets/dig.icoat this head SHA into a scratch dir.
Baseline exit 0; append one byte todig.ico-> exit 1 (hash mismatch printed);
restore -> exit 0; rename the file away -> exit 1 ("is missing"). Non-vacuous. - Canonical bytes — fetched
assets/dig.icofrom the repo at this head SHA:
50443 bytes, sha2562f0fb11a1254fc9275248dc340b7aa9c7236484a9531f8aaad2e4bcdf8900096.
Matches the literal exactly and matches the reference file byte-for-byte. assets/dig.rc— exactly oneICONstatement (1 ICON "dig.ico", ordinal
1), noRT_MANIFESTdeclared. Confirmed by direct fetch + grep, not trust.- Scoping —
dig-node-service/build.rsuses
embed_resource::compile_for("../../assets/dig.rc", &["dig-node", "dign"], ...),
scoping the link line to those two bins.Cargo.tomllists a third bin,
fake_beacon_cli, which is not in that list — excluded as claimed.
dig-wallet/build.rsuses the unscopedembed_resource::compile, correct
becausedig-wallet'sCargo.tomldeclares exactly one[[bin]]. - No behaviour change —
dig-node-service/build.rs's pre-existing
DIG_NODE_GIT_SHAemission (cargo:rustc-env=DIG_NODE_GIT_SHA={sha}, read by
GET /version) is byte-identical to before; the new code is additive
(#[cfg(windows)] embed_icon()) and gated to Windows only.ci.yml's diff is
purely additive (newicon:job appended, nothing else touched). - CI job name —
name: icon asset (sha256 pin)inci.yml, andgh pr checksshows the live job as exactlyicon asset (sha256 pin)— pass, 5s.
Exact string match, no near-miss. - Cargo.lock — diff is
embed-resource 3.0.11+ its own direct deps
(toml 1.1.5+spec-1.1.0,vswhom,vswhom-sys,winreg) plus the
windows-sys/socket2edge-consolidation on pre-existingquinn/
hyper-utilpackages already settled and filed separately per the brief —
not re-litigated here. No unrelated package appears in the lock diff. - Doc-truth — PR body is currently
DO NOT MERGE — gate round in progress
(still draft, correctly not claiming completion). No SPEC/README files are
touched by this PR. New code comments describe only this repo's own
scoping/exclusion decisions; the "every sibling repo that vendors the same
bytes" language indig.rc/check-icon.shdescribes the shared shape
(already proven end-to-end bydig-installer#69), not a false present-tense
claim that sibling repos have landed. No finding.
TOML mid-splice repair (prior finding) — verified complete
crates/dig-node-service/Cargo.toml: fetched this repo's [target.'cfg(windows)'.dependencies]
table content at this head SHA and diffed it byte-for-byte against the same
table on origin/develop — identical, zero diff. The new
[target.'cfg(windows)'.build-dependencies] block sits at end-of-file (line
400), after [dev-dependencies], not spliced into the existing table.
crates/dig-wallet/Cargo.toml checked for the same hazard: the new
[target.'cfg(windows)'.build-dependencies] block is inserted between [[bin]]
(ends at path = "src/main.rs") and [dependencies] — a clean table boundary,
not mid-table. Its own pre-existing [target.'cfg(windows)'.dependencies] table
is also byte-identical vs develop. No splice hazard in either file.
Lockfile consolidation (prior finding) — not re-litigated
Per the brief, this was proven reproducible from a pristine develop lock with
the minimal cargo add, and filed as its own ticket. Accepted as-is.
Not run
- No cargo build in this review (explicitly out of scope per this round's
instructions) — the PE-resource verification is being supplied separately by
the orchestrator and must land on this PR before merge. - No live Windows MSI artifact inspection beyond the green
build .msi (windows-x64)check already on the PR.
Threads
Zero open review threads existed before this review; zero findings raised, so
zero threads opened. Nothing to resolve.
Verdict: PASS at 6c1a3287d1ee6ddd5790f0a551cfb5e6c4d236bb, conditional on
the orchestrator's PE-resource-verifier output landing on this PR before it
leaves draft / merges.
|
PASS Re-audited fresh, read-only, no build (artifact/PE-resource evidence supplied separately by the orchestrator). Lockfile-widening finding (previously CHANGES-REQUIRED) — independently re-verified, verdict changes to accepted:
Elevation posture — CLEAR (re-confirmed fresh). TOML mid-table repair — CLEAR. Vendored icon blob — CLEAR (independently re-parsed, not trusted from the PR body). CI job — CLEAR. Pin-strength honesty — CLEAR. Scope audited: full PR diff ( Worktrees created (mine, not the live build): |
DO NOT MERGE — gate round in progress. Refs #2917.
Work in progress; will update with full verifier output before marking ready.