Repository navigation
[ECHO] Qualify app deployment eligibility before waiting or recording Sentry - #2099
Conversation
This comment has been minimized.
This comment has been minimized.
|
@kody start-review |
|
Automatic approval held Kody's assessment:
|
This comment has been minimized.
This comment has been minimized.
|
@kody start-review |
The critical findings behind this request are resolved.
This comment has been minimized.
This comment has been minimized.
|
@kody start-review |
This comment has been minimized.
This comment has been minimized.
|
@kody start-review |
This comment has been minimized.
This comment has been minimized.
|
@kody start-review |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@kody start-review |
|
@kody start-review |
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Summary
Adds deployment eligibility qualification before production observation and Sentry recording. Workflows now classify whether the live-vs-expected delta is app-relevant and skip waiting/recording for verified non-app deltas, while failing closed to strict observation on any unavailable or unverified evidence.
Changes
production-app-watch-paths.json) andproduction-observer-eligibility.mjsto verify app identity, auto-deploy and watch-path parity, then compare live health revision against expected SHA via ancestry and first-parent changed paths.production-deploy-verify.ymlto load dedicated policy config and gate the exact-revision wait on eligibility output.sentry-deploy.ymlto load dedicated policy config and gate live revision verification / Sentry deployment recording on eligibility output.production-observer-eligibility.node-test.mjscovering app-relevant paths, non-app deltas, renames, malformed evidence, pattern qualification and policy drift, plus workflow wiring checks. Updated existing Sentry reporter test for the additional eligibility context.Operational impact
Tests
Risks / unresolved review findings
Summary
Qualifies app deployment eligibility before waiting or recording Sentry. It rejects malformed external app policy via strict schema validation and narrows observer credential scope to a dedicated metadata-only reader.
Changes
zodschema validation for Coolify app policy inproduction-observer-eligibility.mjs, replacing implicit property checks. Clarified missing-token and policy-read failure errors.sentry-deploy.ymlto install dependencies withnpm ci --ignore-scriptsbefore running node tests, supporting the new validation dependency.test-oracle-deploy-config.mjsfrom forbidding all observer secrets to allowing only the approved single-app policy reader in its dedicated path, while continuing to forbid mutation credentials and unsafe SSH.Tests
Unresolved risks / Review findings
zodimport may break dependency-free test step in record job. Medium: unbounded Coolify response buffering before validation. Medium: observer secret allowlist may miss bracket secret access.Summary
Qualifies app deployment eligibility with stricter policy-response handling before waiting or recording Sentry deploys. Adds bounded, content-type-checked streaming JSON parsing for the app-policy read to reject unavailable, non-JSON, empty, or oversized responses.
Changes
readPolicyResponse()inproduction-observer-eligibility.mjsto validate JSON content type, enforce 64KB size bounds during streaming, and fail closed on malformed payloads;classifyProduction()now uses it instead of unboundedresponse.json().sentry-deploy.ymlrecord job to runnpm ci --ignore-scriptsbefore deployment evidence/reporting tests so zod-backed fixtures have dependencies available.Tests
readPolicyResponse()rejection/acceptance cases and workflow step ordering. No test-run, deployment, or runtime verification evidence is reported in the changes.Risks
test-oracle-deploy-config.mjs:63notes Sentry deploy workflow skips bracket-secret and single-reader checks. Treat as unresolved.Summary
Tightens deploy-config oracle checks to enforce exact approved credentials for observer and Sentry deploy reporting. No runtime workflow behavior is changed by this patch.
Changes
Replaces the single observer secret list check with a reusable exact-secrets assertion applied to the observer workflow, Sentry deploy workflow, and record job. Adds negative cases asserting that bracket-style secret access and injected mutation credentials fail validation, while retaining the reporter's existing Sentry credential and blocking hosting mutation access.
Operational impact
Reduces risk of credential scope creep by failing if unauthorized secrets are added to deployment observation or deploy recording. No user-visible deployment eligibility or Sentry reporting change is implemented in this diff.
Testing
Tests added in
scripts/test-oracle-deploy-config.mjsonly; no test-run evidence, deployment, or runtime verification is provided in the changes, so verification remains unverified.Unresolved risks
Automated review reported 2 medium findings that remain unresolved: whitespace around dot may bypass secret enumeration and the exact-secrets check may miss the
github.tokencredential. Behavior described here is unverified.Summary
Tightens the deploy-config test oracle that guards observer and Sentry reporter credential usage. Parsing now evaluates YAML structure so comments and documentation text are not mistaken for secret references, while quoted workflow expressions remain checked.
Changes
Verification and Risk
Summary
Tightens Oracle deploy-config secret validation to inspect YAML mapping keys as well as values. Adds a test case asserting rejection when an unapproved secret reference appears as a mapping key.
Impact
No runtime or user-visible change. Strengthens the CI guardrail against bypassing the approved-secret allowlist through keys, while continuing to ignore comments and non-expression documentation.
Verification
Test coverage was added in
scripts/test-oracle-deploy-config.mjs. No test run, deployment, or runtime verification is evidenced in the provided changes. Automated code review reported no issues in the changes it reviewed.