fix review: rename hive-knowledge → knowledge throughout, drop false re-clone claim from pull() doc
This commit is contained in:
parent
a176d675cf
commit
cfd677ae7d
2 changed files with 10 additions and 10 deletions
|
|
@ -56,7 +56,7 @@ const SHARED_ORG: &str = "internal";
|
|||
/// at `{FORGE_HTTP}/internal/docs.git`.
|
||||
const SHARED_DOCS_REPO: &str = "docs";
|
||||
/// The hive-wide knowledge repo inside `SHARED_ORG`. Bind-mounted
|
||||
/// read-only into every container at `/hive-knowledge`. Agents
|
||||
/// read-only into every container at `/knowledge`. Agents
|
||||
/// contribute by forking + opening PRs; direct writes to main are
|
||||
/// not granted. See `hive-c0re/src/knowledge.rs`.
|
||||
const KNOWLEDGE_REPO: &str = crate::knowledge::REPO;
|
||||
|
|
@ -611,7 +611,7 @@ pub async fn shared_docs_access(name: &str, core_token: &str) -> Result<()> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Ensure the `internal/hive-knowledge` repo exists. Called once at
|
||||
/// Ensure the `internal/knowledge` repo exists. Called once at
|
||||
/// startup after `ensure_org(SHARED_ORG)`. Idempotent — `ensure_org_repo`
|
||||
/// treats 409 as success.
|
||||
pub async fn ensure_knowledge_repo(core_token: &str) -> Result<()> {
|
||||
|
|
@ -619,7 +619,7 @@ pub async fn ensure_knowledge_repo(core_token: &str) -> Result<()> {
|
|||
}
|
||||
|
||||
/// Grant agent `name` read-only collaborator access to
|
||||
/// `internal/hive-knowledge`. Agents read documents from the bind-mounted
|
||||
/// `internal/knowledge`. Agents read documents from the bind-mounted
|
||||
/// clone and contribute by forking + opening PRs — no write to main.
|
||||
/// Idempotent: HTTP 204 (already a collaborator) is treated as success.
|
||||
pub async fn knowledge_access(name: &str, core_token: &str) -> Result<()> {
|
||||
|
|
@ -630,7 +630,7 @@ pub async fn knowledge_access(name: &str, core_token: &str) -> Result<()> {
|
|||
let status = forge_http(reqwest::Method::PUT, &url, core_token, body).await?;
|
||||
match status.as_u16() {
|
||||
204 => {
|
||||
tracing::info!(%name, "forge: granted hive-knowledge read access");
|
||||
tracing::info!(%name, "forge: granted knowledge read access");
|
||||
Ok(())
|
||||
}
|
||||
other => anyhow::bail!(
|
||||
|
|
@ -818,7 +818,7 @@ pub async fn sync_agent(name: &str, core_token: Option<&str>) {
|
|||
{
|
||||
tracing::warn!(%name, error = ?e, "forge: shared_docs_access failed");
|
||||
}
|
||||
// Grant read-only access to internal/hive-knowledge so the agent can
|
||||
// Grant read-only access to internal/knowledge so the agent can
|
||||
// read the bind-mounted knowledge repo and fork it to open PRs.
|
||||
if let Some(token) = core_token
|
||||
&& let Err(e) = knowledge_access(name, token).await
|
||||
|
|
|
|||
Loading…
Reference in a new issue