Skip to content

✨ ask: hub backend for optional Ask AI help (phase 1 of #19177) #19180

Closed

Description

@clubanderson

Phase 1 of the Ask AI help design. Design: src/docs/design/dashboard-ask-ai-help.md in #19179. Parent: #19177. Recommended model: a server-side call to the vendor's Chat API with the key in a Secret; no third-party code on the page and no CSP change.

Blocked by: #19179 (the design merges first).

Scope (hub backend, no UI)

  1. ask: config block and env overrides (HIVE_ASK_ENABLED, HIVE_ASK_MODE, HIVE_ASK_KAPA_PROJECT_ID, HIVE_ASK_KAPA_INTEGRATION_ID, HIVE_ASK_KAPA_API_KEY_FILE, HIVE_ASK_SEND_SECTION_LABEL, limit overrides). Off by default; if enabled but a value is missing or the key file unreadable, stay off and log one warning without values. Key file under the allowed secret directory. Redact in config export; never return or log the key, project id or integration id.
  2. Vendor client for POST /query/v1/projects/{project_id}/chat/ (key in X-API-KEY). Confirm the non-streamed response shape (source fields, thread id) against the vendor API reference and pin it with a contract test. Non-streaming in v1. Send only the fields in the design's "What leaves the deployment" table.
  3. Per-person consent record (separate file per person, atomic, 0600, text_version, grant and withdraw) and its routes. Deleted with the user.
  4. POST /api/ask on the hub behind requireAuth: refuse credential-shaped input with FindSecret, length caps, source allowlist (docs site host and the GitHub docs path), no source means a "no cited answer" result, thread ids kept server-side bound to the person with a TTL.
  5. Limits as named constants with env overrides (per person, per hive, hub-wide per minute, in-flight, daily budget), a circuit breaker, a 429 and timeout path that returns a fallback result.
  6. Audit lines with outcome and counts only, never text; counters by outcome.

Tests

Fake vendor server asserts the exact request body and that seeded secrets, repo names, hive names and logins never appear; off means no route and a byte-identical CSP; consent gates every request; limits and breaker hold; credentials never appear in any response, log or export.
Next phase: #19181

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 19, 2026
  2. hivecommons-hive commented on Nov 19, 2026

    @hivecommons-hive
    Contributor

    🔓 Claim by @HuntedRaven7 released (lease revoked).

    Claim history
    • 2026-11-19 01:18 UTC — claimed by HuntedRaven7 (contributor on hive hosted-available-oke-11-placeholder-r05x)
    • 2026-11-19 01:19 UTC — released by HuntedRaven7 (contributor; lease revoked)
  3. self-assigned this
    on Nov 19, 2026
  4. clubanderson commented on Nov 19, 2026

    @clubanderson
    MemberAuthor

    Claiming this phase of the Ask AI help work. Implementation follows the merged design in src/docs/design/dashboard-ask-ai-help.md; a PR will be linked here.

  5. added
    stage/020-claimedClaimed by the scanner or a relay contributor
    and removed
    stage/010-actionableTriaged; eligible for the hive to pick up
    on Nov 19, 2026
  6. clubanderson commented on Nov 19, 2026

    @clubanderson
    MemberAuthor

    PR: #19200

  7. added a commit that references this issue on Nov 19, 2026
    626f1bc
  8. added a commit that references this issue on Nov 19, 2026
    eaaaea3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions