Repository navigation
fix(review): remediate session findings and harden self-improvement review loop - #673
Merged
dan-petty merged 1 commit intoSep 28, 2026
Merged
Conversation
…ate findings - Remediate genuine findings from review session 20260928-040906: - run_store: sanitize get_run against path traversal and verify relative path resolution - cloudflare: narrow broad exception handling to JSON and decoding errors - symbols: narrow bare exception in Python source symbol extraction - payoff: narrow bare exception in days active calculation - ollama docs: update k8s manifest reference to ollama-profiles.yaml - constants: expand fixture credential keywords - Self-improvement and feedback loop hardening: - common_hallucinations: refactor verify_ground_truth_hallucination into dedicated helpers and table-driven dispatch - add ground truth verification for dependency ecosystem, test mocks, and masked secret redaction markers - add common hallucination catalog entries for structural tuple equality, localhost default configs, POSIX signal 0 liveness, and pre-1.0 breaking change tolerance - verification: add deterministic short-circuit checkers and early filters for tuple equality, localhost URLs, signal 0, and benign documentation compliments - prompts: update review and verification prompts to prevent tautological criteria verification and sanitizer marker false alarms - docs: record Calibration Record for session 20260928-040906 in docs/SELF_IMPROVEMENT.md - tests: add comprehensive unit tests with structural tuple equality assertions for new checkers and run_store traversal defenses
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.
Summary
This PR remediates genuine findings identified during review session
20260928-040906onrelease/v0.2.23and hardens the self-improvement, common hallucination verification, and feedback loop.Remediated Review Findings
src/devops_cli/ai/run_store.py:get_run(run_id, ...)to reject path traversal attempts containing/,\, or...baseroot workspace.src/devops_cli/cloudflare/client.py:_handle_responseto(ValueError, json.JSONDecodeError).src/devops_cli/ai/analyze/symbols.py:except Exception:inextract_python_source_symbolstoSyntaxError, ValueError, RecursionError.src/devops_cli/ai/spend/payoff.py:except Exception:in_calculate_days_activetoValueError, TypeError.src/devops_cli/ai/knowledge_base/it_domains/tools/ollama.md:k8s/llm/ollama.yamltok8s/llm/profiles/ollama-profiles.yaml.src/devops_cli/config/constants.py:CONST_FIXTURE_CREDENTIAL_KEYWORDSto cover"hardcoded api key","hardcoded key","exposed api key","plaintext api key", and"api key masking".Self-Improvement & Review Loop Hardening
src/devops_cli/ai/review/common_hallucinations.py):_verify_syntax_grammar_ground_truth,_verify_secret_scanning_ground_truth,_verify_dependency_ecosystem_ground_truth,_verify_test_mocks_ground_truth,_verify_documentation_context_ground_truth,_verify_mutable_defaults_ground_truth,_verify_boundary_errors_ground_truth) with table-driven dispatch via_GROUND_TRUTH_VERIFIERS.pyproject.toml(e.g.httpx2).sk-gateway,example.com, etc.).<masked-*>,***REDACTED***).src/devops_cli/ai/review/common_hallucinations.json):HALLUCINATION-STRUCTURAL-TUPLE-EQUALITY,HALLUCINATION-LOCALHOST-DEFAULT-CONFIG,HALLUCINATION-POSIX-SIGNAL-ZERO-LIVENESS, andHALLUCINATION-PRE-1-0-BREAKING-CHANGE.HALLUCINATION-LOCAL-DEV-NODEPORT-EXPOSUREandHALLUCINATION-K8S-CLUSTER-OVERLAY-HTTP.src/devops_cli/ai/review/verification.py):_check_structural_tuple_equality_hallucination,_check_localhost_default_url_hallucination,_check_posix_signal_zero_liveness_hallucination, and_check_pre_1_0_breaking_change_hallucination._check_benign_complimentto intercept documentation narratives and praise before criteria execution runs.src/devops_cli/ai/tasks/review.mdandsrc/devops_cli/ai/tasks/verify_finding_system.mdwith explicit falsification rules against tautological criteria, documentation narratives, structural tuple assertions, localhost default configurations, and prompt sanitizer placeholder claims.docs/SELF_IMPROVEMENT.md):20260928-040906, tracking 174 findings, 5 false-positive classes, remediations, and systemic feedback loop hardening.20260928-040906/findings.json(invalidating 28 recurring false alarms) and exported the updated feedback dataset viadevops review export-feedback.tests/test_common_hallucinations_hardening.pyandtests/test_run_store.pyenforcing structural tuple equality assertions.Verification
devops ciquality gates locally with 100% pass across all 10 checks.