CI broken: pre-existing build errors in messaging/knowledge + stale .forgejo/deps.txt #69
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#69
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?
Problem
CI currently fails on
development(and every feature branch) for two independent reasons that are pre-existing and unrelated to any single feature work. Both were surfaced while reviewing PR #67 but are out of scope for that PR.1. SDK method mismatches in
messagingandknowledgecargo check --workspacefails because two crates call methods that no longer exist in the currenthero_osis_sdk.hero_archipelagos_messagingFile:
archipelagos/messaging/src/services/messaging_service.rsCommunicationClient::conversationservice_list_messagesdoes not exist inhero_osis_sdk(branchdevelopment). The only close match rustc suggests isconversation_list(&self) -> Result<Vec<String>, ClientError>, which takes no arguments and returns a list of conversation SIDs, not messages. There is no drop-in replacement — likely candidates are a combination ofchatmessage_list()+chatmessage_get()with client-side filtering, or a new SDK method.hero_archipelagos_knowledgeFile:
archipelagos/intelligence/knowledge/src/services/knowledge_service.rsEmbedderClient::new(osis_url, context_name)at line 19 — theEmbedderClienttype is no longer exposed byhero_osis_sdk.client.knowledgeservice_bucket_sync(bucket_id.to_string())at line 80 — method does not exist.client.knowledgeservice_bucket_search(bucket_id, query, ...)at line 95 — method does not exist.Nine
cargo checkerrors total in this crate.Reproduction
Both fail on
developmentat current HEAD.Impact
cargo check --workspace/cargo build --workspacefails, which is exactly what the CI step--- cargo check (native) ---runs, so every CI job fails withexitcode '101'.archipelagos_server, which depends onhero_archipelagos_messaging) cannot build either, so the server binary cannot be built from a clean checkout.Likely fix direction
The SDK was refactored; the callers need to be updated to the new surface. This requires someone familiar with the new SDK layout to:
CommunicationClientfor listing messages in a conversation (and updatemessaging_service.rsaccordingly).EmbedderClientusage inknowledge_service.rs, and updateknowledgeservice_bucket_sync/knowledgeservice_bucket_searchcalls to the current SDK equivalents.2. Stale cross-repo patch in
.forgejo/deps.txtFile:
.forgejo/deps.txtThe CI workflow
.forgejo/workflows/build.yamlreads this file on every non-developmentbranch, clones each referenced repo, and generates a.cargo/config.tomlwith a[patch."<git_url>"]entry pointing at a local path.Problems with line 2:
Cargo.tomlno longer declaresherofossil_webdav_client— the actual workspace dep ishero_foundry_webdav_clientsourced fromhttps://forge.ourworld.tf/lhumina_code/hero_foundry.git./workspace/hero_fossil/webdav-client, which either does not exist inhero_fossil.git(wrong repo) or references a path that has been moved/removed (the directory listing forhero_fossil.git@developmentdoes not includewebdav-client).CI error
Impact
Every CI run on a feature branch fails at the patch step before any real checks run. Only pushes directly to
developmentskip the patching (the workflow has an early-exit forBRANCH == "development"), which masks the issue for direct pushes but not for PR branches.Likely fix
Update
.forgejo/deps.txtto match the actual workspace dependency, e.g. replace the second line with:The correct subpath inside
hero_foundry.gitneeds to be confirmed — it is not a top-level directory; it is probably undercrates/.Reproduction
Acceptance criteria
cargo check --workspacepasses ondevelopment.cargo check -p hero_archipelagos_messagingpasses.cargo check -p hero_archipelagos_knowledgepasses..forgejo/deps.txtmatches the real workspace deps; CI patch step succeeds on a feature branch.build.yaml) succeeds on bothdevelopmentand a feature branch.References
Implementation Spec for Issue #69
Objective
Unbreak workspace CI by (1) correcting the cross-repo patch paths in
.forgejo/deps.txt, (2) removing the stalehero_osis_sdk::embedderusage from theknowledgecrate by stubbing the methods that are actually called and deleting those that are not, and (3) refreshingCargo.locksomessagingresolves against the currenthero_osis_sdkwhich already providesconversationservice_list_messages.Root-Cause Summary
sdk/rust/was removed upstream; the SDK now lives atcrates/hero_osis_sdk/..forgejo/deps.txtstill points the feature-branch patcher atsdk/rust, so the patch step fails on every non-developmentbranch.Cargo.tomldeclareshero_foundry_webdav_clientfromhero_foundry.git(branchdevelopment), crate pathcrates/hero_foundry_webdav_client. The stalehero_fossil ... webdav-cliententry in.forgejo/deps.txtpoints at a repo/path that no longer exists.Cargo.lockis refreshed.archipelagos/messaging/src/services/messaging_service.rscallsclient.conversationservice_list_messages(...). That method now exists onCommunicationClientin the currenthero_osis_sdk; no source changes required.embeddermodule was removed fromhero_osis_sdk(no replacement client exists —hero_embedder_sdkexposes lower-levelnamespace/embed/indexAPIs, not buckets). Of the six methods inarchipelagos/intelligence/knowledge/src/services/knowledge_service.rs, only three (fetch_buckets,sync_bucket,delete_bucket) are actually called fromisland.rs. The other three (fetch_bucket,create_bucket,search_bucket) are unused and will be removed. This mirrors the pattern already in place inarchipelagos/intelligence/intelligence/src/services/knowledge_service.rs.Requirements
cargo check --workspacepasses.cargo check -p hero_archipelagos_messagingpasses with no source changes.cargo check -p hero_archipelagos_knowledgepasses..forgejo/deps.txtlists only crates that exist in the workspace, with correct repo + subpath.build.yaml) succeeds ondevelopmentand on a feature branch.Files to Modify/Create
.forgejo/deps.txt-- fixhero_osis_sdksubpath and replace the stalehero_fossilentry withhero_foundry_webdav_client.archipelagos/intelligence/knowledge/src/services/embedder_types.rs(NEW) -- local type stubs (KnowledgeBucket,SyncResult) replacing the removedhero_osis_sdk::embeddertypes.archipelagos/intelligence/knowledge/src/services/mod.rs-- register the newembedder_typesmodule and re-export its types.archipelagos/intelligence/knowledge/src/services/knowledge_service.rs-- keep only the three methods used byisland.rs(fetch_buckets,sync_bucket,delete_bucket), stub each to return an "unavailable" error; deletefetch_bucket,create_bucket,search_bucket.archipelagos/intelligence/knowledge/src/island.rs-- replaceuse hero_osis_sdk::embedder::KnowledgeBucket;withuse crate::services::KnowledgeBucket;.Cargo.lock-- refresh viacargo update -p hero_osis_sdkso messaging resolves the updated SDK.Implementation Plan
Step 1: Fix
.forgejo/deps.txt(no deps)Files:
.forgejo/deps.txtReplace the two patch lines with:
Step 2: Create
embedder_types.rs(no deps)Files:
archipelagos/intelligence/knowledge/src/services/embedder_types.rs(NEW)Define
KnowledgeBucket { id, name, quality: u8, item_count: u32 }andSyncResult { synced: bool }. Both deriveClone, Debug, Default, PartialEq, Serialize, Deserialize. All fields inKnowledgeBucketare read byisland.rstemplate code.Step 3: Register the new module (depends on Step 2)
Files:
archipelagos/intelligence/knowledge/src/services/mod.rsAdd
pub mod embedder_types;andpub use embedder_types::*;.Step 4: Rewrite
knowledge_service.rs(depends on Steps 2, 3)Files:
archipelagos/intelligence/knowledge/src/services/knowledge_service.rshero_osis_sdkimports andEmbedderClientusage.fetch_buckets(osis_url, context_name) -> Result<Vec<KnowledgeBucket>, String>sync_bucket(osis_url, context_name, bucket_id) -> Result<SyncResult, String>delete_bucket(osis_url, context_name, bucket_id) -> Result<bool, String>Err("Knowledge service unavailable: embedder SDK not yet integrated".to_string()).fetch_bucket,create_bucket,search_bucket(no callers in the repo).Step 5: Fix the import in
island.rs(depends on Steps 2-4)Files:
archipelagos/intelligence/knowledge/src/island.rsChange
use hero_osis_sdk::embedder::KnowledgeBucket;touse crate::services::KnowledgeBucket;.Step 6: Refresh
Cargo.lock(depends on Steps 1-5)Run
cargo update -p hero_osis_sdk.Step 7: Workspace verification (depends on Steps 1-6)
Run
cargo check --workspace,cargo fmt --all -- --check, then project tests.Parallelism
Steps 1 and 2 run independently. Steps 3, 4, 5 run independently once Step 2 is done. Step 6 is serial after all source changes. Step 7 is last.
Acceptance Criteria
.forgejo/deps.txtlists exactly two lines, both pointing at real paths on thedevelopmentbranches of their repos.archipelagos/intelligence/knowledge/src/services/embedder_types.rsexists and definesKnowledgeBucketandSyncResult.archipelagos/intelligence/knowledge/importshero_osis_sdk::embedderorEmbedderClient.knowledge_service.rscontains only the three stub methods (fetch_buckets,sync_bucket,delete_bucket).cargo check -p hero_archipelagos_knowledgepasses.cargo check -p hero_archipelagos_messagingpasses without source changes.cargo check --workspacepasses.cargo fmt --all -- --checkpasses.Notes
hero_osis_sdkdep stays commented out inarchipelagos/intelligence/knowledge/Cargo.tomlas a breadcrumb; re-enabling it would only reintroduce the compile error because theembedderfeature is gone.fetch_bucket,create_bucket,search_bucketare deleted (not stubbed) because nothing in the repo calls them.archipelagos/intelligence/intelligence/src/services/knowledge_service.rs, which adopted the same stub+local-types approach.hero_osis_sdkis out of scope -- follow-up ticket.Test Results
The acceptance criteria were verified via the exact commands listed in the spec:
cargo check -p hero_archipelagos_knowledgecargo check -p hero_archipelagos_messagingCargo.lockrefresh pulled in the newconversationservice_list_messagesonCommunicationClient)cargo check --workspacecargo fmt --all -- --checkOne pre-existing compile blocker surfaced while verifying workspace check and was fixed in the same branch:
examples/os_components/src/island_content.rs—IslandContextgained two new fields (window_id,initial_url_segment) that the constructor here did not initialize. Added both asString::new(). This was blockingcargo check --workspaceondevelopmentprior to this work.One pre-existing
cargo fmtdeviation inarchipelagos/messaging/src/archipelago.rs(import ordering) was auto-fixed by runningcargo fmt --all.Implementation Summary
All spec steps implemented on branch
development_ci_fix_knowledge_deps.Files Changed
.forgejo/deps.txt— fixhero_osis_sdksubpath tocrates/hero_osis_sdk; replace stalehero_fossil/webdav-cliententry withhero_foundry_webdav_client=crates/hero_foundry_webdav_client.archipelagos/intelligence/knowledge/src/services/embedder_types.rs(new) — local type stubsKnowledgeBucketandSyncResultreplacing the removedhero_osis_sdk::embeddertypes.archipelagos/intelligence/knowledge/src/services/mod.rs— registerembedder_typesmodule and re-export its types.archipelagos/intelligence/knowledge/src/services/knowledge_service.rs— keep onlyfetch_buckets,sync_bucket,delete_bucketas stubs returning"Knowledge service unavailable: embedder SDK not yet integrated"; drop unusedfetch_bucket,create_bucket,search_bucket; drop allhero_osis_sdkimports.archipelagos/intelligence/knowledge/src/island.rs— replacehero_osis_sdk::embedder::KnowledgeBucketimport withcrate::services::KnowledgeBucket.examples/os_components/src/island_content.rs— add missingwindow_idandinitial_url_segmentfields toIslandContextinitializer (pre-existing blocker surfaced while verifyingcargo check --workspace).archipelagos/messaging/src/archipelago.rs— cargo fmt import reordering (pre-existing deviation).Cargo.lockrefreshed viacargo update -p hero_osis_sdkso messaging resolves the current SDK which already providesconversationservice_list_messages.Verification
cargo check -p hero_archipelagos_knowledgepassescargo check -p hero_archipelagos_messagingpasses (no source changes)cargo check --workspacepassescargo fmt --all -- --checkpasses.forgejo/deps.txtlists only crates that exist in the workspace with correct repo + subpathNotes
hero_osis_sdkdep stays commented out inarchipelagos/intelligence/knowledge/Cargo.tomlas a breadcrumb; re-enabling it would only reintroduce the compile error because theembedderfeature is gone upstream.hero_osis_sdkis out of scope for this PR — follow-up ticket.build.yaml) validation on the feature branch will run once the PR is opened.Pull request opened: #85
This PR implements the changes discussed in this issue.