feat(odoo_patch): import tools in module_graph patch#17
Draft
sentry-hz-ledoweb[bot] wants to merge 1 commit into
Draft
feat(odoo_patch): import tools in module_graph patch#17sentry-hz-ledoweb[bot] wants to merge 1 commit into
sentry-hz-ledoweb[bot] wants to merge 1 commit into
Conversation
5 tasks
dnplkndll
added a commit
to ledoent/seer
that referenced
this pull request
May 21, 2026
…gnosis taxonomy, confidence gate, openupgrade context PR feedback on the first autofix-generated PR (ledoent/OpenUpgrade#17, which landed 'import tools' instead of the planned ir_module_module check) called out six classes of needed improvement. This PR lands four. A. Hallucination guards (coding system prompt) - Causal connection: state in ONE sentence how the change prevents the specific error before any edit. Vague rationales are red flags. - Symbol usage: imports added must appear in the file body. - File targeting: stack-frame file ≠ fix file for MISSING STATE symptoms (database, table, module, config). D. Diagnosis taxonomy (solution system prompt) Explicit two-list classification: symptoms that almost never map to code fixes (database/table missing, permission denied, module not installed, connection refused, repeated startup errors, multi-DB patterns) → investigation outcome; symptoms that do (AttributeError, invalid-field, IntegrityError, concrete type errors) → code change. E. Confidence calibration + gate Solution prompt: avoid weasel words; high confidence requires exact file+line + named cause + intent preservation. Code gate in commit_changes: solution_step.proceed_confidence_score below AUTOFIX_PR_MIN_CONFIDENCE (new AppConfig field, default 0.7) produces branch + diff but skips the PR. Surfaces low-confidence runs to humans. AUTOFIX_PR_MIN_CONFIDENCE=0.0 disables. F-partial. Repo context (openupgrade-lab) Shared note in both prompts: monkey-patch caution, bind-mount awareness, multi-DB-symptom-as-operator-state heuristic, commit conventions. Cassette re-recorded: 10 calls (4 view + 6 str_replace), 661 KB. Bigger than v4 because the longer system prompt produces longer Gemini request bodies — but ir_module_module on-plan assertion still holds. Unit tests for the gate: low-confidence → branch only, no PR; high-confidence → both as before. Drive-by fix: B019 in get_org_slug (functools.lru_cache on a method). Replaced with a per-instance dict cache. Same behavior, no memory leak. Triggered by this PR touching the file. Deferred to separate PRs: B. per-repo commit/branch conventions (needs PR-creation code change) C. self-validation gates with ruff/pyflakes as a new tool F-full. per-project context injection (openupgrade-lab is hardcoded for now)
6 tasks
dnplkndll
added a commit
to ledoent/seer
that referenced
this pull request
May 21, 2026
…gnosis taxonomy, confidence gate, openupgrade context (#18) * feat(autofix): hardening from PR feedback — hallucination guards, diagnosis taxonomy, confidence gate, openupgrade context PR feedback on the first autofix-generated PR (ledoent/OpenUpgrade#17, which landed 'import tools' instead of the planned ir_module_module check) called out six classes of needed improvement. This PR lands four. A. Hallucination guards (coding system prompt) - Causal connection: state in ONE sentence how the change prevents the specific error before any edit. Vague rationales are red flags. - Symbol usage: imports added must appear in the file body. - File targeting: stack-frame file ≠ fix file for MISSING STATE symptoms (database, table, module, config). D. Diagnosis taxonomy (solution system prompt) Explicit two-list classification: symptoms that almost never map to code fixes (database/table missing, permission denied, module not installed, connection refused, repeated startup errors, multi-DB patterns) → investigation outcome; symptoms that do (AttributeError, invalid-field, IntegrityError, concrete type errors) → code change. E. Confidence calibration + gate Solution prompt: avoid weasel words; high confidence requires exact file+line + named cause + intent preservation. Code gate in commit_changes: solution_step.proceed_confidence_score below AUTOFIX_PR_MIN_CONFIDENCE (new AppConfig field, default 0.7) produces branch + diff but skips the PR. Surfaces low-confidence runs to humans. AUTOFIX_PR_MIN_CONFIDENCE=0.0 disables. F-partial. Repo context (openupgrade-lab) Shared note in both prompts: monkey-patch caution, bind-mount awareness, multi-DB-symptom-as-operator-state heuristic, commit conventions. Cassette re-recorded: 10 calls (4 view + 6 str_replace), 661 KB. Bigger than v4 because the longer system prompt produces longer Gemini request bodies — but ir_module_module on-plan assertion still holds. Unit tests for the gate: low-confidence → branch only, no PR; high-confidence → both as before. Drive-by fix: B019 in get_org_slug (functools.lru_cache on a method). Replaced with a per-instance dict cache. Same behavior, no memory leak. Triggered by this PR touching the file. Deferred to separate PRs: B. per-repo commit/branch conventions (needs PR-creation code change) C. self-validation gates with ruff/pyflakes as a new tool F-full. per-project context injection (openupgrade-lab is hardcoded for now) * chore(autofix): bugbot review — drop overreaching multi-DB rule + document fail-open Self-review of PR #18 surfaced two findings: 1. The `<diagnosis_taxonomy>` block in solution prompts listed "multi-database error patterns" as a general signal of operator state, not code. That's right for openupgrade-lab but wrong for multi-tenant apps where per-tenant DBs DO map to real provisioning code bugs. Removed from the general taxonomy. The openupgrade-lab- specific framing stays in <repo_context> where it's anchored to the dev names (`repro_a`, `seed_*`, `openupgrade_test`) that actually indicate operator state in this fork. 2. The confidence gate fails OPEN when proceed_confidence_score is None (older runs, restart-from-point flows, manual handoff). That was intentional — we only want to fire on observed low confidence, not absence-of-signal — but the choice wasn't documented in code. Added an inline rationale so the next reader doesn't accidentally flip the polarity. Cassette stays valid: the coding cassette only captures coding-step Gemini calls, and the multi-DB removal touched only the solution prompt. vcrpy default matchers ignore body, so even where the system prompt differs the cassette replay matches by URI.
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.
Fixes OPENUPGRADE-LAB-3. The issue was that: Odoo process queries uninitialized database
repro_aforir_module_moduletable, which does not exist, causing repeated errors.This fix was generated by Seer in Sentry, triggered by dkendall@ledoweb.com. 👁️ Run ID: 12