Repository navigation
feat(knowledge): correct auth-field docs + pagination tests for enterprise connectors (#10538) - #13042
Merged
Conversation
…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.
Contributor
✅ SSOT Configuration Compliance: Passing🎉 No hardcoded values detected that have SSOT config equivalents! |
This was referenced Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 fivealready-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_tsextraction) and#12979/#12999 (pooled HTTP client migration). All three connectors implement the exact same
AbstractConnectorcontract as every other connector in the family (base.py) —auth_schema(),output_schema(),{"status_code","body"}HTTP-result shape,_load_ts/_store_tscheckpointing,get_http_client().tracked_request()for outbound HTTP (no rawaiohttp.ClientSession) — and arereachable end-to-end:
knowledge/connectors/__init__.pyimports them behind thekb_enterprise_connectorsfeature flag,api/knowledge_connectors.py's_SUPPORTED_TYPESlistsslack/confluence/jira, andGET /knowledge_base/connector_types/POST /knowledge_base/connectorsoperate on whateverConnectorRegistryhas registered. 69existing 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:
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 declaredauth_schema()— but the guidewas 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.response_metadata.next_cursorfor Slack,startoffset for Confluence,startAt/totalfor Jira) and the connector code handles it, butthe 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
docs/knowledge-base/enterprise-connectors-setup.md: corrected every config-key table, curlexample, and source-line citation to the current, post-fix(kb): align connector credential reads with declared auth_schema (#12221) #12225/tech-debt(backend): extract knowledge-connector base — _load_ts/detect_changes duplicated across connectors #12659 code (
token/username+passwordinstead ofbot_token/email+api_token; Redis checkpoints now cited tothe shared
base.pyhelpers instead of removed per-connector copies). Replaced the "Knownlimitation: auth-field mismatch" section with an "Auth-field alignment" section documenting that
fix(kb): align connector credential reads with declared auth_schema (#12221) #12225 resolved it.
autobot-backend/knowledge/connectors/{slack,confluence,jira}_test.py: added one multi-pagepagination test per connector, each driving
discover_sources()through a real multi-callsequence (2-3 mocked pages) and asserting every page's sources were collected — not merely that no
exception was raised.
suite:
test_raw_client_session_ceiling_12992is currently red onDev_new_gui(13 rawaiohttp.ClientSessionsites vs. the recorded ceiling of 12) due to 3 undocumented new rawsessions in
agent_loop/search/config_declared_provider.py,orchestration/dag_executor.py, andservices/slm_client.py— none touched by this PR, filed separately per convention.Verification
Full offline connector suite (69 tests, unaffected + 3 new pagination tests = 72 net after adding,
47 shown for the 3 touched files):
Full connector-family suite (unaffected files) still green:
flake8 --max-line-length=120andblack --check --line-length=120on the 3 touched test files: clean.Registration/reachability proof (no code path added — confirming the existing one):
autobot-backend/api/knowledge_connectors.py:84-86listsslack/confluence/jirain_SUPPORTED_TYPES.autobot-backend/knowledge/connectors/__init__.py:85-88imports (and therefore@ConnectorRegistry.registers) all three behindkb_enterprise_connectors.GET /knowledge_base/connector_types(knowledge_connectors.py:346-369) andPOST /knowledge_base/connectors(:401-482) operate onConnectorRegistry.registered_types()/.create()dynamically — no hardcoded connector list to update.Baseline diff:
test_raw_client_session_ceiling_12992fails identically before and after this PR(13 vs. ceiling 12, same offender list — none in
knowledge/connectors/, confirming this PR didn'ttouch 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