Skip to content

feat(knowledge): correct auth-field docs + pagination tests for enterprise connectors (#10538) - #13042

Merged
mrveiss merged 1 commit into
Dev_new_guifrom
issue-10538
Jul 30, 2026
Merged

mrveiss merged 1 commit into
Dev_new_guifrom
issue-10538

Conversation

@mrveiss

@mrveiss mrveiss commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Thinking Path

Audited #10538 before writing anything, per instructions. The Slack/Confluence/Jira KB
ingestion connectors already exist, fully implemented, in
autobot-backend/knowledge/connectors/{slack,confluence,jira}.py, delivered across five
already-merged PRs: #12189 (scaffold), #12199 (offline mock/replay connector + fixtures),
#12219 (operator setup guide), #12225 (auth-schema/credential-key alignment, closing #12221),
plus later cross-cutting refactors #12659 (shared _load_ts/_store_ts extraction) and
#12979/#12999 (pooled HTTP client migration). All three connectors implement the exact same
AbstractConnector contract as every other connector in the family (base.py) — auth_schema(),
output_schema(), {"status_code","body"} HTTP-result shape, _load_ts/_store_ts checkpointing,
get_http_client().tracked_request() for outbound HTTP (no raw aiohttp.ClientSession) — and are
reachable end-to-end: knowledge/connectors/__init__.py imports them behind the
kb_enterprise_connectors feature flag, api/knowledge_connectors.py's _SUPPORTED_TYPES lists
slack/confluence/jira, and GET /knowledge_base/connector_types /
POST /knowledge_base/connectors operate on whatever ConnectorRegistry has registered. 69
existing offline tests (mocked HTTP, real assertions on content/metadata, auth-failure paths, and
the feature-flag gating) were green before this PR and remain green after.

So there was no connector left to build. Digging into why the issue was still open (owner's own
comments on the issue thread), the remaining ask was live-credential validation against real Slack/
Confluence/Jira tenants — which the owner separately clarified (2026-07-24 comment) is a per-install
operator task using the secrets manager, not something dev/CI does. That leaves the issue's code-side
acceptance criteria fully met, but two real gaps surfaced during the audit that a straight "close, no
changes" would have left behind:

  1. The operator setup guide had gone stale. PR fix(kb): align connector credential reads with declared auth_schema (#12221) #12225 (auth-key alignment) landed after PR
    docs(kb): operator setup guide for Slack/Confluence/Jira connectors (#10538) #12219 (the setup guide) and renamed the connector's config-read keys (bot_token->token,
    email/api_token->username/password) to match the declared auth_schema() — but the guide
    was never updated. It still told operators to send the old, now-rejected field names, still
    described the mismatch as unresolved, and still said "Issue feat(knowledge): Slack / Confluence / Jira KB ingestion connectors #10538 stays open for the
    live-credential wiring" — which is exactly backwards now that fix(kb): align connector credential reads with declared auth_schema (#12221) #12225 fixed it. An operator
    following the guide today would get 422s.
  2. No pagination test. All three APIs paginate (response_metadata.next_cursor for Slack,
    start offset for Confluence, startAt/total for Jira) and the connector code handles it, but
    the offline test suite only ever mocked a single page.

Both are small, directly in-scope fixes for #10538's own deliverable, so I fixed them here rather
than filing follow-ups, per the "fix pre-existing issues discovered along the way" rule.

What Changed

Verification

Full offline connector suite (69 tests, unaffected + 3 new pagination tests = 72 net after adding,
47 shown for the 3 touched files):

knowledge/connectors/slack_test.py       .............. (14 incl. new pagination test)
knowledge/connectors/confluence_test.py  ............... (15 incl. new pagination test)
knowledge/connectors/jira_test.py        .................. (18 incl. new pagination test)
============================== 47 passed in 1.13s ==============================

Full connector-family suite (unaffected files) still green:

knowledge/connectors/{slack,confluence,jira}_test.py
knowledge/connectors/mock_test.py
knowledge/connectors/connectors_init_gating_test.py
============================= 69 passed in 10.25s ==============================

flake8 --max-line-length=120 and black --check --line-length=120 on the 3 touched test files: clean.

Registration/reachability proof (no code path added — confirming the existing one):

  • autobot-backend/api/knowledge_connectors.py:84-86 lists slack/confluence/jira in
    _SUPPORTED_TYPES.
  • autobot-backend/knowledge/connectors/__init__.py:85-88 imports (and therefore
    @ConnectorRegistry.registers) all three behind kb_enterprise_connectors.
  • GET /knowledge_base/connector_types (knowledge_connectors.py:346-369) and
    POST /knowledge_base/connectors (:401-482) operate on ConnectorRegistry.registered_types() /
    .create() dynamically — no hardcoded connector list to update.

Baseline diff: test_raw_client_session_ceiling_12992 fails identically before and after this PR
(13 vs. ceiling 12, same offender list — none in knowledge/connectors/, confirming this PR didn't
touch the ratchet). Pre-existing, filed as #13041.

Startup import smoke: unaffected — this PR touches only test files and docs, no importable modules
changed.

Model Used

Claude Sonnet 5

…nterprise connectors (#10538)

The Slack/Confluence/Jira connectors were already fully implemented,
registered, and tested (PRs #12189, #12199, #12219, #12221/#12225,
#12659, #12979). Auditing #10538 found the operator setup guide had
gone stale after #12225 renamed the config keys to match auth_schema()
(bot_token->token, email/api_token->username/password) — the doc still
told operators to send the old, now-rejected field names, and still
claimed the mismatch was unresolved and #10538 stayed open for it. This
corrects every field name, config-key table, and source citation in the
guide, replaces the "Known limitation" section with the resolved state,
and updates the Redis-checkpoint description to point at the shared
base.py helpers extracted by #12659.

Also adds a multi-page pagination test per connector (Slack cursor,
Confluence start offset, Jira startAt), closing the one gap from the
acceptance criteria that wasn't already covered offline.
@github-actions

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

@mrveiss
mrveiss merged commit 3044d63 into Dev_new_gui Jul 30, 2026
42 of 43 checks passed
@mrveiss
mrveiss deleted the issue-10538 branch July 30, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant