[enhancement] hero_books library selection not yet bound to X-Hero-Context #116
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_books#116
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
hero_bookslibrary selection is by requestlibraryparameter only — not yet bound toX-Hero-Context.hero_books_ui/src/proxy.rs:22-67parses the context header but doesn't use it for library access control. Today libraries are per-namespace by convention; the design intent is correct but the wiring is unfinished.Source
crates/hero_books_ui/src/proxy.rs:22-67—X-Hero-Contextparsed in proxy middleware.crates/hero_books_server/src/web/rpc.rs:319-402—search.queryand similar key offlibraryparameter.libraries.txtregisters<namespace> <git_url>per line; on-disk roots at~/hero/var/books/{library}/.Why this matters
Less severe than the embedder/indexer cases because libraries are intended as a public/shared layer (the agent grounds on
docs_heroregardless of context, by design). But the sovereignty pitch implies per-context library curation: "personal contexts can have private libraries the agent grounds on, isolated from other contexts." That requires binding context → allowed library set on request entry.Proposed fix
librarywith the caller's context allowlist; reject if not present.Severity
Low. Soft contract today, no enforcement; doesn't break demo functionality but blocks the "private per-context libraries" sovereignty story.
Cross-refs
hero_embedder/hero_indexer/hero_aibroker(this session)Spotted during docs_hero Phase 1 source-grounded read (session 52). Reconciliation memo:
memory/investigation_roadmap_reconciliation.md.