Repository navigation
test(config): pin effective inventory contract - #2328
Conversation
Problem: #2309 depends on the config inventory being executable rather than decorative, but the current tests did not directly prove key/env uniqueness or that env-sourced effective values preserve source metadata while redacting secrets. What changed: add focused tests for unique inventory keys/env vars, required owner/reload/effective-path metadata, redacted env-sourced API auth token payloads, and typed env values flowing through effective_config_payload. Verification: devtools test tests/unit/core/test_config.py::TestConfigInventoryPayload tests/unit/devtools/test_deployment_smoke.py::test_deployment_smoke_runtime_evidence_includes_effective_config tests/unit/devtools/test_deployment_smoke.py::test_deployment_smoke_includes_effective_config_evidence; devtools verify --quick. Ref #2309
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA new pytest class ChangesConfig Inventory and Effective Payload Tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Summary
Adds focused tests that make the #2309 effective-configuration inventory contract executable: unique inventory keys/env vars, required metadata, redacted env-sourced secrets, and typed env values flowing through
effective_config_payload.Problem
The downloaded #2309 patch is stale against current
master; the main effective-config surfaces already exist (polylogue config --format json, configuration docs, and deployment-smoke runtime evidence). The remaining risk is that the inventory becomes decorative metadata: future config keys could drift from env mapping, source-layer reporting, or secret redaction without a direct test failing.Solution
POLYLOGUE_API_AUTH_TOKENappears only as<set>, reportssecret_present, and preservessource_layer=envwithout leaking the real secret.POLYLOGUE_BROWSER_CAPTURE_PORT) reacheseffective_config_payloadwith the right value, env var, and source layer.The patch file
/realm/inbox/download/pths/polylogue_2309_config_inventory_effective_state.patchwas not mechanically applied. Its major code/docs intent is already present onmaster; this PR hardens the missing contract coverage around that landed surface.Verification
devtools test tests/unit/core/test_config.py::TestConfigInventoryPayload tests/unit/devtools/test_deployment_smoke.py::test_deployment_smoke_runtime_evidence_includes_effective_config tests/unit/devtools/test_deployment_smoke.py::test_deployment_smoke_includes_effective_config_evidence-> pass (5 passed)devtools verify --quick-> pass (20260623T121441Z-quick-3443684-3ebc9195)devtools verify --quick-> pass (20260623T121534Z-quick-3445534-f57a4d77)Ref #2309
Summary by CodeRabbit