Skip to content

REVISE the Postgres assessment (#408): the inventory has a phantom store, an omitted store and two wrong filenames - #413

Merged
jaylfc merged 1 commit into
masterfrom
exec/tsk-srpeiy
Sep 5, 2026
Merged

REVISE the Postgres assessment (#408): the inventory has a phantom store, an omitted store and two wrong filenames#413
jaylfc merged 1 commit into
masterfrom
exec/tsk-srpeiy

Conversation

@jaylfc

@jaylfc jaylfc commented Aug 28, 2026

Copy link
Copy Markdown
Owner

CARD TITLE (intent, not commit subject): REVISE the Postgres assessment (#408): the inventory has a phantom store, an omitted store and two wrong filenames

Autonomous build of board card tsk-srpeiy.

  • add missing insights.db (InsightStore at taosmd/reflect.py:130, init at
    taosmd/auto_setup.py:122-124)
  • remove phantom pending-decisions.db, restate as kg_pending_decisions table
    inside knowledge-graph.db at taosmd/pending_decisions.py:43
  • correct mentions.db to a2a-mentions.db and receipts.db to a2a-receipts.db
    per taosmd/api.py:148, taosmd/api.py:151, taosmd/migrations.py:421
  • unify vector-memory.db as OPTIONAL / Local-Only, remove from Core Memory
    Storage in section 1.1
  • replace truncating inventory command (ended in head -N) with a re-runnable
    grep that produces the full row set
  • replace aggregate 'All Other Required Stores' verdict with per-store verdict
    and evidence for all 14 rows
  • correct LIMIT citation from tsk-7wau2y to tsk-2hnss2, anchor to
    taosmd/archive.py:380 instead of 'Various query methods'
  • remove unsourced 'approximately 40 percent higher' figure and six-week
    timeline; keep 1793 passed / 10 skipped / 7 errors baseline

Proof: doc-gate invariants and diff-gate against origin/master are clean

Files:
.../tsk-srpeiy-revise-postgres-assessment.md | 6 +
docs/postgres-assessment.md | 387 +++++++++++++++++++++
2 files changed, 393 insertions(+)

- add missing insights.db (InsightStore at taosmd/reflect.py:130, init at
  taosmd/auto_setup.py:122-124)
- remove phantom pending-decisions.db, restate as kg_pending_decisions table
  inside knowledge-graph.db at taosmd/pending_decisions.py:43
- correct mentions.db to a2a-mentions.db and receipts.db to a2a-receipts.db
  per taosmd/api.py:148, taosmd/api.py:151, taosmd/migrations.py:421
- unify vector-memory.db as OPTIONAL / Local-Only, remove from Core Memory
  Storage in section 1.1
- replace truncating inventory command (ended in head -N) with a re-runnable
  grep that produces the full row set
- replace aggregate 'All Other Required Stores' verdict with per-store verdict
  and evidence for all 14 rows
- correct LIMIT citation from tsk-7wau2y to tsk-2hnss2, anchor to
  taosmd/archive.py:380 instead of 'Various query methods'
- remove unsourced 'approximately 40 percent higher' figure and six-week
  timeline; keep 1793 passed / 10 skipped / 7 errors baseline

Proof: doc-gate invariants and diff-gate against origin/master are clean
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 18 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5b0cf937-c62b-4084-af8d-82c634a81de6

📥 Commits

Reviewing files that changed from the base of the PR and between e0429ac and 540fc8a.

📒 Files selected for processing (2)
  • changelog.d/tsk-srpeiy-revise-postgres-assessment.md
  • docs/postgres-assessment.md

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gitar-bot

gitar-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@jaylfc

jaylfc commented Aug 30, 2026

Copy link
Copy Markdown
Owner Author

Reviewed by reading the document against the codebase at master 0baa9af9, since no gate in this repo checks a document's claims against the code.

The three defects this PR was filed to fix are all discharged: there is no phantom store, no wrong filename, and the store inventory otherwise matches. Sourcing is genuinely good, all 49 file.py:line citations resolve and the content at each line matches what the text claims about it. Two issues remain.

1. Section 1.2's universal claim is false, and its own cited evidence is the counter-example.

The section states "All databases use standardized connection patterns via taosmd._db.connect()", which enables WAL and a 5000 ms busy timeout. Two callers bypass it:

$ grep -rn 'sqlite3\.connect(' taosmd --include=*.py | grep -v '_db.py'
taosmd/receipts.py:56:        self._conn = sqlite3.connect(self._db_path, check_same_thread=False)
taosmd/migrations.py:610:        conn = sqlite3.connect(str(path))
$ grep -rln '_db\.connect(' taosmd --include=*.py | wc -l
15

ReceiptStore.init opens its connection raw and sets no journal mode and no busy timeout anywhere in the file, while its sibling store does:

$ grep -n 'journal_mode\|WAL\|busy_timeout\|_db' taosmd/receipts.py
52:        self._db_path = db_path
56:        self._conn = sqlite3.connect(self._db_path, check_same_thread=False)
$ grep -n '_db\.connect(' taosmd/mentions.py
31:        self._conn = _db.connect(self._db_path)

This is load bearing for a Postgres assessment rather than a wording nit. a2a-receipts.db is classified REQUIRED in the section 1.4 table, so it is in the must-migrate set, and the feasibility argument rests on there being one centralised connection helper to swap. A store that opens its own connection is exactly what a swap of _db.connect() would miss. Section 1.2 should say 15 of 17 call sites use the helper and name the two exceptions, and section 1.4 should carry the consequence for a2a-receipts.db.

Worth noting separately: the receipts docstring at taosmd/receipts.py:47 claims the store runs "exactly like the other taOSmd stores", which is where this claim appears to have come from. The docstring is wrong, not just the assessment. I am raising the missing WAL and busy timeout on that store as its own defect against master; it is not this PR's to fix.

2. Section 1.1 lists 13 stores where the document elsewhere has 14.

Section 1.1 says it covers "all SQLite databases currently used by taOSmd" and gives the command it used. Run verbatim against master that command yields 14, and the section 1.4 table also has 14 rows. vector-memory.db is absent from 1.1 only:

$ grep -rh '"[^"]*\.db"' taosmd --include="*.py" | grep -oP '[a-z0-9_-]+\.db' | sort -u | wc -l
14

The store itself is not overlooked, it has a full subsection at 2.2 and a row in the 1.4 table, so this is a one line omission in the inventory rather than a gap in the analysis. Adding it under "Core Memory Storage" makes 1.1 agree with 1.4 and with the stated command.

Neither issue calls for a rewrite. The analysis is sound and the migration path is the right shape.

@jaylfc
jaylfc merged commit a99ecd0 into master Sep 5, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant