refactor(credentials): expose semantic registry identifiers - #999
refactor(credentials): expose semantic registry identifiers#999seonghobae wants to merge 12 commits into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…rename The credential-semantic-identifiers rename in this branch renamed InMemoryCredentialBackend's private attributes (_store -> _credential_store, _lock -> _credential_lock) and the module-level backend lock (_backend_lock -> _credential_backend_lock), but two tests still referenced the pre-rename names, failing CI's "Full unit and contract suite" job: - tests/test_credentials_backends.py::test_get_backend_handles_another_thread_winning_initialization patched the nonexistent `credentials._backend_lock` instead of `credentials._credential_backend_lock`, and assigned to `_backend` instead of `_credential_backend`. - tests/test_pii_protection.py::test_missing_kv_key_and_invalid_event_declarations_fail_closed popped from the nonexistent `InMemoryCredentialBackend._store` instead of `_credential_store`. Both tests now reference the current attribute names. Verified locally: targeted tests pass, and the full suite is green except the two pre-existing, environment-specific failures unrelated to this change (fast_mlsirm unavailable in sandbox; a local tokenizer usage-source artifact in test_spend_analytics.py). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BV96rXhqoR3tYZ9AeAVur4
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BV96rXhqoR3tYZ9AeAVur4
|
Brought this branch current with
Generated by Claude Code |
|
Autonomous loop note on exact head
No source change made here; no action needed beyond the re-runs unless they fail again for a different reason. Generated by Claude Code |
Owner and reuse boundary
ContextualWisdomLab/contextual-orchestratorowns the shared runtime credential registry used by provider discovery, model routing, CI gateway seeding, server bearer-token resolution, and downstream ecosystem consumers. Its public Python helpers exposed generic keyword names (name,value,backend) even though the domain concepts are credential name, credential value, and credential backend.TDD / repair
99cb1d1af9a51f41d923dd389e4239f6bc530c74requires public semantic signatures and semantic keyword calls while pinning legacy keyword compatibility.credentials.pynow usescredential_name,credential_value,credential_backend,credential_store,credential_lock, and database-specific local names internally.name=,value=, andbackend=remain bounded compatibility aliases. Semantic+legacy duplicate authority fails closed; unknown compatibility kwargs are rejected.inspect.signaturereports the required semantic parameters through explicit__signature__metadata installed withsetattr; no typing/deprecation/security finding is suppressed.Review-driven causal repair
Fresh Devin review found that the semantic rename had updated
InMemoryCredentialBackendto_credential_lock/_credential_storebut left package-internal atomic registration and rollback callers on removed_lock/_store. That was a real current-head runtime defect, not a naming-only concern: the default in-memory provider bootstrap could abort before model discovery.The canonical branch now repairs both causal callers through ordinary non-force history:
provider_bootstrap.register_provider_credentials_atomicallyuses_credential_lockand_credential_storewhile preserving a single-lock atomic batch update;provider_catalog_bootstrap._restore_provider_credentials_atomicallyuses the same renamed state while preserving single-lock atomic rollback/delete semantics;The corresponding review thread was resolved only after both source repairs landed. No predecessor check result is transferred.
Persistence / security invariants
The compliant Postgres schema is unchanged:
provider_credentials(credential_name, encrypted_value, updated_at). UPSERT conflict ownership remainscredential_name; pgcrypto encryption, transactions, provider-secret handling, KV-vs-env policy, and network authority do not change.Documentation / research
docs/doctoring/credential-semantic-identifiers.mdrecords the DDD bounded context, compatibility boundary, persistence invariants, verification contract, and APA 7 research traceability to Schankin et al. (2018) and Feitelson et al. (2022).Exact identity
main@4d143601c2904a28e95d091b261c0a15e9a4f283fix/credential-semantic-identifiers5f1d7e23929378698a8a1d14d3327f0da2b0cde7Fresh exact-head Tests, Fuzz, Security, Security Scan, SAST, coverage, dependency, OSV, Trivy, Scorecard, OpenCode, Strix, and queue evidence is required. Current repository workflow runs have materialized for this head and remain non-passing evidence until terminal. Predecessor/base/model-only evidence does not transfer.
Merge gate
Do not merge until the unchanged current head has all applicable required checks terminal-success, valid review findings/threads resolved, qualifying independent non-author approval current for the last push, and ordinary branch protection permits merge. No force-push, self-approval, bypass, or gate weakening.