Conformance audit: oschema/blueprint gap (home#243) + doc drift #9
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_researcher#9
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?
Audit of
hero_researcheragainst (1) the canonical Hero service blueprint (lhumina_code/hero_blueprint@development,blueprints/service/), (2) this repo's own commit history, and (3) the acceptance criteria inlhumina_code/home#243.lab infocheckpasses (2 crates clean, 0 findings) — manifests are valid. The gaps below are structural / scope, not manifest compliance.1. REQUIRED: oschema + blueprint foundation (home#243)
home#243 mandates the researcher be "made with oschema and blueprint". Current state does not meet this:
hero_researcher_serverships a hand-writtensrc/openrpc.json+ hand-writtendispatch_rpc()match (crates/hero_researcher_server/src/main.rs:538-608). The blueprint server is generated byherolib_macros::openrpc_server!(spec = "oschema", service_toml = "service.toml").schema/service.oschemaexists but drives no codegen (orphaned)._sdkcrate (blueprint generates a typed Rust client +docs/openrpc.jsonfrom the schema).→ Migrate
_servertoopenrpc_server!overschema/*.oschema; regenerate SDK + docs. See/hero_server_migration.2. REQUIRED deliverables still missing (home#243)
/md2docx).herolib_aiacross many models, not a kimi-agent frontend; no wiring to thebackground_checkskill /lab agent./hero_voice_widget).mainin cloud TFGrid (ZOS VM) — local UDS service only.3. Crate-shape divergence from blueprint
<name>(domain lib) +_server+_admin+_web+_sdk+sdk/{rhai,js,python}+tests/+docs/.hero_researcher_lib+hero_researcher_server(admin UI folded in asadmin.sock) +hero_researcherCLI._sdk, a separate_admincrate, sdk language bindings, an integrationtests/crate, generateddocs/openrpc.json.4. Deliberate decisions confirmed by history (docs-only, or leave)
web.sock→admin.sockwas an intentional rename (ee3431b"D-10 sweep"). Code is correct; README + PURPOSE still sayweb.sock→ stale docs, fix docs.lab-based now (Makefile/scripts removed inbb6c376). README/PURPOSE still reference a Nushellservice researcher startscript that does not exist in the repo → fix docs.--start/--stoplifecycle (509b37f) predates the blueprint's "lab owns lifecycle" guidance — candidate to drop during the migration.5. Toolchain drift (low-risk)
tokio = { features = ["full"] }— blueprint uses a curated feature set and explicitly advises againstfull.Cargo.tomlhas no[profile.release]— blueprint defines one (opt-level 2,panic="abort", strip, codegen-units 16).rust-version = "1.96"was deliberately re-added (b508fa8) but conflicts with workspace policy (1.94–1.95, no pin) and the blueprint (1.93) → confirm intent before changing.6. README/PURPOSE doc discrepancies (first-pass audit)
GROQ_API_KEY/SAMBANOVA_API_KEY/DEEPINFRA_API_KEYin README are correct (consumed byherolib_ai::AiClient::from_env) — keep.SCRAPERAPI_API_KEYS/SCRAPFLY_API_KEYSare read inconfig.rsbut never used and undocumented → dead config, wire or remove.job.rsandlog_bridge.rsare missing from the README "Project Structure"./health,/.well-known/heroservice.json,/api/stats,/api/stats/reset.What is already done (for reference)
Working multi-model research pipeline (6 search providers, 8 platform scrapers, 3 tiers all verified real), JSON-RPC 2.0 server + HTML admin dashboard over
rpc.sock/admin.sock, SQLite job persistence, canonicalservice.toml+service_base!()(passeslab infocheck), 13 runnable examples.Suggested sequencing
_server(+ generated_sdk) — the home#243 gate.maindeploy (ZOS VM).Refs:
lhumina_code/home#243.Progress + blocker
Done (commit
4112370, doc-conformance slice — §4/§6):web.sock→admin.sockin README + PURPOSE (the socket was deliberately renamed inee3431b; docs were stale).service researcherflow with the canonicallab build/lab servicelifecycle.job.rs/log_bridge.rsto the structure.BLOCKER for the oschema/blueprint migration (§1) — upstream, not in this repo:
The workspace does not currently build.
hero_researcher_lib → herolib_ai (feature "hero-proc") → hero_proc_sdk, andhero_proc_sdkat the currentdevelopmenttip (14ee3ea) fails to compile:This is version skew — the generated client was renamed
HeroProcClient_→HeroProcClientand thesystemdomain module dropped, against the current herolib_macros.cargo updatelocks 0 packages, so this is the live branch tip, not a stale cache.The oschema migration is compile-driven (the
openrpc_server!macro generates the trait/types/spec at build time and the impl is checked against it), so it can't be done safely until the stack builds green.Unblock options (pick one before the migration):
hero_proc_sdkupstream on hero_procdevelopment(the real fix — it's broken for every consumer right now).hero_procto a last-known-good revision in this workspace until upstream is fixed.hero-procfeature on theherolib_aidependency if the lib doesn't need it (it pullshero_proc_sdktransitively) — needs verification that nothing in_librelies on it.Migration readiness:
schema/service.oschemaalready defines the full contract (single coherent API → onemaindomain, model B). Recon per/hero_server_migrationis done; key Step-0 decisions still to confirm: (a) keep the HTML dashboard in_serverviaserve_domains_withvs. split it into a canonical_admincrate (openrpc_proxy!); (b) wire-name renameresearch.*→research_*(the admin dashboard JS calls these — must update in lockstep). Ready to execute the moment the build is green.Blocker now tracked upstream:
lhumina_code/hero_proc#146.Root cause nailed: with the confirmed development→development branch policy, this repo pulls hero_proc
development(14ee3ea, = #140) + hero_libdevelopment(277299dc), andhero_proc_sdk'sopenrpc_client!panics — the hero_proc schema'sJobCreate.inputs/RunSpec.inputsare{str: any}, which the current hero_lib macro rejects per openrpc_principles Rule 2 (a recurrence of the closed hero_proc#142/#143). Not a hero_researcher bug; not fixable here.Supersedes the earlier "pin hero_lib" suggestion — pinning is off the table given development→development. The oschema/blueprint migration (§1) resumes once hero_proc#146 lands and hero_proc
developmentbuilds against hero_libdevelopmentagain. (Verified theintegrationset builds green, so the fix is known; it just needs to reachdevelopment.)Doc slice (§4/§6) remains done at
4112370.