fix(ci): green CI — clippy + jsonwebtoken dev-dep + build-linux tag-only #19
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_embedder!19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_mik_1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Third repo in the home#188 CI sweep.
Three classes of root-cause fix per the engineering discipline, in one PR because they all gate the same goal (green CI on
hero_embedder/development).1. Missing
jsonwebtokendev-dependencytests/auth_integration_test.rsimportsjsonwebtokenbut the crate was never declared as a dev-dep onhero_embedder_lib.cargo build --testsfailed E0432/E0433;cargo clippy --all-targetsfollowed.Fix: added
jsonwebtoken = "9"to[dev-dependencies]with a comment explaining why.2. 17 clippy
-D warningserrorsAuto-fixed by
cargo clippy --fix:mutclone_on_copyonOption<Callback>Three manual fixes (each with a comment):
hero_embedder_proxy/src/main.rs— deadmatchwith both arms{}; collapsed tolet _ = ...preserving the side-effect callhero_embedder_lib/src/proc_client.rs—..Default::default()onJobCreateInputwas redundant for the currently-resolved hero_proc_sdk pin. Removed; when the SDK pin is bumped to includeinputs, the missing-field compile error will surface and be fixed explicitly per the discipline.hero_embedder_app/src/components/kvs_tab.rs—Leaf(String)field unused at render (matched asLeaf(_)). Kept with#[allow(dead_code)]+ comment because it's preserved for a future click handler.3.
build-linux.yamltriggers on every dev pushSame issue as hero_proxy #27:
build-linux.yamlfired on every push tomainanddevelopmentin addition to tags. Itspublish_binariesstep tries to upload to a Forgejo release tagged with the pushed ref — for non-tag pushes that release doesn't exist, so every dev push went red.Restricted trigger to
v*tags +workflow_dispatchonly. Matches the canonical release.yaml pattern. Header comment documents the deviation from full canonical (ONNX / esaxx-rs C++ deps will need follow-up for static-pie musl when the home#187 release-artifacts P0 lands).Local verification
Out of scope (per home#188 — separate follow-up PRs)
build-linux.yaml→release.yamlshape (full home#187 release-artifacts pattern, with documented ONNX/esaxx deviations)hero_embedder_lib/src/api/*(current workflow doesn't enforcefmt-check; not blocking CI green)Discipline confirmation
test.yaml+build-linux.yaml) before declaring scope — caught the build-linux trigger problem upfront, not post-merge-D warnings#[allow(...)]away clippy warningsbuild-linux.yamlworkflow — kept it as the future release pipelineTracker: home#188
Signed-off-by: mik-tf
Three classes of root-cause fix per home#188 engineering discipline, in one PR because they all gate the same goal (green CI on hero_embedder/development). ## 1. Add missing jsonwebtoken dev-dependency `tests/auth_integration_test.rs` imports `jsonwebtoken` but the crate was never declared as a dev-dependency on `hero_embedder_lib`. `cargo build --tests` failed with E0432/E0433 unresolved-import errors; clippy --all-targets followed. Fix: added `jsonwebtoken = "9"` to `[dev-dependencies]` with a comment explaining why. ## 2. Resolve 17 clippy --all-targets warnings (was -D warnings) Mostly auto-fixable by `cargo clippy --fix`: - 16 collapsible-if (collapsed) - 2 unnecessary mut variables (removed mut) - 2 clone_on_copy on Option<Callback> (removed clone) - 2 manual arithmetic check (replaced with checked_*) - 1 unused variable (removed) - 1 needless_borrow (removed) Three required manual fixes: - `hero_embedder_proxy/src/main.rs` — dead `match` with both arms `{}`; collapsed to `let _ = ...` preserving side effect - `hero_embedder_lib/src/proc_client.rs` — `..Default::default()` on JobCreateInput was redundant for the currently-resolved hero_proc_sdk pin (which doesn't yet have the `inputs` field). Removed; when the SDK pin is bumped to include `inputs`, the missing-field compile error will surface and be fixed explicitly per the discipline. - `hero_embedder_app/src/components/kvs_tab.rs` — `Leaf(String)` field is unused at the render site (matched as `Leaf(_)`); kept the field with `#[allow(dead_code)]` + comment because it's preserved for a future click handler (line ~155 just doesn't read it yet). ## 3. Fix build-linux.yaml trigger — tag-only `build-linux.yaml` was firing on every push to `main` and `development` in addition to tags. Its `publish_binaries` step at the end tries to upload to a Forgejo release tagged with the pushed ref — for non-tag pushes that release doesn't exist, so every dev push went red. Restricted trigger to `v*` tags + `workflow_dispatch` only, matching the canonical release.yaml pattern. Same approach as hero_proxy #27. Header comment notes the deviation from canonical (ONNX / esaxx-rs C++ deps will need follow-up for static-pie musl once the home#187 release-artifacts P0 lands). ## Local verification ``` make check ✓ make test ✓ make lint ✓ (cargo clippy --workspace --all-targets -- -D warnings) ``` ## Out of scope (per home#188 — separate follow-up PRs) - Canonicalise build-linux.yaml → release.yaml shape (full home#187 release-artifacts pattern, with documented ONNX/esaxx deviations). - pre-existing fmt drift in hero_embedder_lib/src/api/* (current workflow doesn't enforce fmt-check; not blocking). Third repo in the home#188 CI sweep. Tracker: lhumina_code/home#188 Signed-off-by: mik-tfPushed
4acc4dd— fixes the CI failure on run #344. Root cause:..Default::default()fromJobCreateInputreasoning the locally-resolved hero_proc_sdk pin (8e7e9850) had noinputsfield, so the spread was redundant.Cargo.lock, so it resolves fresh to the latestbranch=developmentof hero_proc_sdk on every run.9b134018) ADDED theinputsfield.Fix: set
inputs: Noneexplicitly. Works on both pre- and post-#49 SDK pins. Comment in the source documents the cross-repo dependency for future readers.Verified locally after
cargo update -p hero_proc_sdk(now resolves to#9b134018, same as CI):Lesson: locally-resolved cargo state can diverge from CI when
Cargo.lockisn’t committed. Will file a separate issue for committingCargo.lockto hero_embedder for reproducibility (out of scope for this PR).Squash-merged to
developmentas6a305a8. Branch deleted. Post-merge push CI awaiting verification.Pull request closed