fix(probes,managers): argv truncation, silent psql failures, wrong pg cluster #40
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 545 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.377
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #40"
general
weight: 0.35
Kimkhoi3010
Summary
probes._ps_snapshotadds-wwto itspscall, so a long argv keeps the-c <config>and--logfilethat_cli_optionsparses out of it.probes.long_queriesanswers(rows, error)through_psql_json, the way every sibling db probe already does, so an unreachable postgres renders as an error instead of an empty table. Updatespanes/detail.py,mcp_server.py(raisesValueError, so the agent side sees the failure too) and the docs demo fixture's stub.Manager.pg_targetreadsdb_host/db_user/db_passwordoff the odoo config alongsidedb_port— the probes now connect the way the instance itself does. Gated ondb_host: unset means the unix socket, commonly peer auth, where forcingPGUSERwould connect as the wrong role, so that case takes the old path byte-identically.Manager.databasesasks over that same target instead of rebuilding a bare port string for its own query, so the database list and the db tabs beside it can no longer read different clusters.DockerManager.databasesalready did this; base does now.-wwis requested, an unreachable postgres is not an idle database,db_hostdecides both directions of the gate, and the database list arrives over the db-tab target.Context
Found while testing the tool against two independent Odoo projects on one box — different launchers (
odoo.shshell script vsemoi start), different configs, different addons layouts.pstruncationThe Config tab reported
(no config file found)and Logs(no logfile configured)for an instance whose config and logfile were both sitting on disk. For an instance started from a shell, argv is the config —_cli_optionsparsesdb_name,db_port,data_dirandlogfileout of that one string — so a cut string is lost settings:Precondition, stated plainly: bash does not export
COLUMNS, so this does not fire in every shell — it fires wherever something does export it (tmux and screen, dotfiles, CI runners). It surfaced here because the pty harness driving the TUI exported it. The defect is in thepscall, not the harness: the failure mode is a confident wrong answer, so an operator reading "no config file" goes looking in the wrong place.long_queriesswallowing a failureWith postgres unreachable, three tabs on the same connection disagreed:
| tab | shown |
| --- | --- |
| Queries |
(empty)|| Users |
Error [<db>]: No such file or directory|| Jobs |
psql: error: connection to server on socket ... failed|The tab that looked healthiest is the one that failed. Queries is the first tab a database row opens, and
(empty)there reads as "this database is idle" — the opposite of "I could not reach postgres". No new pattern is introduced by the fix;_psql_jsonalready draws exactly this line for the job probes, and this brings the last direct-psqlprobe in line with them.Wrong postgres cluster
The test box runs two separate postgres servers, which is what made this visible:
The odoo config names
db_host,db_useranddb_password. The probes kept onlydb_port, soPgTarget.env_prefixcame out empty and the call was a barepsql— and on Debianpsqlispg_wrapper, which with noPGset resolves a socket connection to the box's default* cluster. Two failure shapes, one per instance:| instance |
db_port| old behaviour || --- | --- | --- |
| A | unset | connects silently to the wrong cluster —
databases_by_rolereturns[],psql -d <db>says the database does not exist, Queries prints(empty)|| B | set | fails outright —
psql: connection to server on socket ".s.PGSQL.5432" failed, rc=2, every db tab dead |Neither reaches the postgres its Odoo is connected to. After the fix both do: 7 and 8 databases listed respectively, and
res_usersreadable on each.Forge-ID: 68812