docs(contract): clarify minimal OCS envelope + reuse _BROKER_READY
Address round-1 review nits: - document why _ocs_capabilities omits the rest of the OCS envelope (Pact V4 allows extra provider-side keys; pin only astrolabe's own block) - use the module-level _BROKER_READY in the broker-source guard instead of re-checking the three env vars inline Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
f7fefee9da
commit
7b43cc8220
@@ -36,7 +36,14 @@ pytestmark = pytest.mark.contract
|
||||
|
||||
|
||||
def _ocs_capabilities(enabled_doc_types: list[str]) -> dict:
|
||||
"""Minimal OCS envelope carrying just astrolabe's semantic_search block."""
|
||||
"""Minimal OCS envelope carrying just astrolabe's semantic_search block.
|
||||
|
||||
Intentionally omits the rest of a real OCS response (other apps'
|
||||
capabilities, ``meta.statuscode``/``message``, etc.): Pact V4 allows extra
|
||||
provider-side keys, so pinning only the block this consumer reads keeps the
|
||||
contract focused on what astrolabe owns without coupling to Nextcloud-core
|
||||
envelope fields.
|
||||
"""
|
||||
return {
|
||||
"ocs": {
|
||||
"meta": {"status": "ok"},
|
||||
|
||||
Reference in New Issue
Block a user