build: cargo check fails on messaging (SDK drift) and productivity/projects (enum drift) — regression of #69 #193
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_archipelagos#193
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Summary
Regression of #69 (closed 2026-04-21).
cargo check --workspaceagainstdevelopmenthead (2026-04-29) still fails on the samemessagingSDK mismatch, plus a sibling drift inproductivity/projects.The running
~/hero/bin/hero_os_ui(built 2026-04-29 15:07) reflects an older snapshot — anyone touching messaging/projects ondevelopmentwill hit this immediately.Failures (1 of 2) —
hero_archipelagos_messagingIdentical surface to the closed #69 — same file, same SDK method, no replacement landed.
Failures (2 of 2) —
hero_archipelagos_projects13× E0599 on
ProjectStatus::TodoandProjectStatus::Donenot found in the SDK enum:Files:
archipelagos/productivity/projects/src/views/status_style.rsand…/views/project_form.rs.Repro
Suggested fix
For
messaging: implement the missing SDK method onCommunicationClient(probablyconversation.list_messages(sid)returningVec<ChatMessage>) and update the consumer.For
productivity/projects: realign with the actualProjectStatusvariants in the currenthero_osis_sdk(look athero_osis_sdk/src/projects/types.rsfor the canonical names).Related
messagingSDK drift (same root cause).server/src/main.rs), different error class.Found via QA session 2026-04-29.
Implementation Spec for Issue #193
Objective
Refresh the pinned
hero_osis_sdkgit revision inCargo.lockso the workspace compiles against the SDK head that already containsconversationservice_list_messagesand the shrunkenProjectStatus { Todo, InProgress, Done }. No consumer source changes are needed — this is a lock-file regression, not a code regression.Requirements
cargo check --workspace(and thereforemake check) exits 0 on thedevelopmenthead.Cargo.lock; no.rssource files need to change because they already use the new API surface.hero_archipelagos; the SDK already has the methods and enum variants on itsdevelopmenthead).hero_osischeckout.Files to Modify/Create
Cargo.lock— bump thehero_osis_sdkgit source SHA from the stale7acc28c53e61b1439d773587dcaa9b2d8641c53e(Apr 15) to current head1aee7b8onlhumina_code/hero_osis@development, which contains commitse0e02dd(list_messagesRPC, Apr 19) and69c998a(ProjectStatus shrink, Apr 20). Done viacargo update -p hero_osis_sdk.Implementation Plan
Step 1: Verify the diagnosis
Files: read-only
Cargo.tomlpinshero_osis_sdk = { git = "...hero_osis.git", branch = "development" }(branch-tracked, no rev pin).Cargo.lockrecordssource = "git+...?branch=development#7acc28c53e61b1439d773587dcaa9b2d8641c53e"forhero_osis_sdk. This SHA predates both fix commits.crates/hero_osis_sdk/src/communication/osis_client_generated.rs:805exposesconversationservice_list_messages(conversation_sid: String) -> Result<Vec<ChatMessage>, _>— exact signature the consumer calls.crates/hero_osis_sdk/src/projects/types.rsdeclaresenum ProjectStatus { Todo, InProgress, Done }— exact variants the consumer uses.Dependencies: none.
Step 2: Refresh the SDK lock entry
Files:
Cargo.lockhero_archipelagosrepo root run:cargo update -p hero_osis_sdk.branch = "development"git dependency to the current head SHA, rewrites thehero_osis_sdkentry inCargo.lock, and triggers a freshgit fetchinto~/.cargo/git/.Cargo.lockSHAs; let cargo do it.Cargo.toml— thebranch = "development"pin is correct.Dependencies: Step 1.
Step 3: Verify the workspace compiles
Files: none (read-only verification)
make check(=cargo check). Expect exit 0; noE0599errors onProjectStatus::Todo/Doneorconversationservice_list_messages.cargo check --workspaceexplicitly so non-default-feature crates also build.cargo tree -p hero_osis_sdkreports the new SHA.Dependencies: Step 2.
Acceptance Criteria
cd hero_archipelagos && make checkexits 0.cd hero_archipelagos && cargo check --workspaceexits 0.Cargo.lockshowshero_osis_sdkpinned to a SHA that descends from bothe0e02dd(list_messages) and69c998a(ProjectStatus shrink)..rssource files underarchipelagos/messaging/orarchipelagos/productivity/projects/are modified by this PR — the diff isCargo.lock-only.Notes
chatmessage_list+ filter) is moot: the SDK head already exposes the exact method name + signature the consumer uses. The "no method found" error is purely a lock-file drift artifact, not a source bug.Todo/InProgress/Doneare also referenced inarchipelagos/productivity/projects/src/views/board_view.rs(lines 33–35, 96, 104, 112) andarchipelagos/productivity/projects/src/services/project_service.rs:154. All compile fine after the lock refresh — they already use the correct post-shrink names.7acc28c(Apr 15) predatese0e02dd(Apr 19) and69c998a(Apr 20). Anyone who rancargo updateafter Apr 20 would not see the regression; anyone doing a fresh checkout-and-build with the existing lock would. CI evidently uses the existing lock, hence the regression./home/rawda/projects/hero_os_repos/hero_osisdoes NOT influence the build becauseCargo.tomlusesgit = "..."notpath = "...". The build pulls from the remote into~/.cargo/git/. The fix must be a lock refresh, not a local-tree edit.[patch]or source-replacement entries pointing at the localhero_osischeckout — that would couple this repo to one developer's filesystem layout.Follow-up suggestions (out of scope here, do not implement now)
This is the second occurrence of the same drift (regression of #69). Root cause is structural:
Cargo.lockis committed but never refreshed in CI for git-tracked deps with branch pins, so the lock can lag the SDK branch indefinitely until somebody runscargo updatelocally.cargo update -p hero_osis_sdk(and any other Hero-sourced crates) on each PR build, fails if the lock changes, prompting the author to commit the refresh — or commits it automatically.hero_osis_sdkto a specificrev = "..."instead ofbranch = "development"and bump intentionally — drift becomes visible at PR review.These should be filed as separate tickets after this PR lands.
Closing — CI is not actually broken
After investigation, this is not a CI/release-blocking issue and there is no committable fix that would close it as filed. Closing with the workaround documented for anyone who hits the symptom locally.
Diagnosis
Cargo.lockis in.gitignore(line 4) for this repo. CI ondevelopmenttherefore starts every build with no lock and resolveshero_osis_sdk = { git = "...", branch = "development" }to the SDK head SHA at the moment of the run. Recent CI runs ondevelopment(PRs #179, #180, #181) all completed successfully against the current SDK.The symptom —
cargo checkfailing onconversationservice_list_messagesnot found andProjectStatus::Todo/Donenot found — only appears on developer working trees that have a stale localCargo.lockfrom a build done before the SDK drift commits landed. The.gitignorekeeps the local lock alive across SDK changes, but nothing forces a refresh.Workaround for affected developers
Verified locally on 2026-04-29: refresh moved the lock from SDK SHA
7acc28c5(Apr 15) to1aee7b83(currentdevelopmenthead) andcargo checkpasses.Why no PR
A
cargo update -p hero_osis_sdkproduces a modifiedCargo.lockonly — andCargo.lockis.gitignored, sogit statusis clean afterward. There is nothing to commit. Pinning to a specificrev = "..."inCargo.toml, or removingCargo.lockfrom.gitignore, are both structural changes outside the scope of "fix the build" and worth deciding deliberately as separate tickets if the maintainers want to prevent recurrence.Suggested follow-up tickets (not filing now — leaving to maintainer judgement)
make checkself-healing — prependcargo update -p hero_osis_sdk(and any other Hero-sourced crate) to thechecktarget inMakefileso a stale local lock auto-refreshes on first attempt. One-line change, fixes the developer-experience trap without changing dep-resolution conventions.Cargo.lockgitignore policy — this workspace builds binaries (WASM islands + a server). Conventional Rust guidance is to commitCargo.lockfor binaries/applications. Doing so would give every developer + CI the same SDK pin and surface drift at PR review.rev— most explicit, makes drift visible at PR review, but requires intentional bumps for every SDK change.Closing.