test_reputation_update_success IndexError: agents table missing 'embedding' column #258
Labels
No labels
blocked:children
blocked:commit-ready-failed
blocked:depends-231
blocked:depends-236
blocked:depends-237
blocked:depends-238
blocked:depends-239
blocked:gate-fetch
blocked:gate-fetch
blocked:gate-lint
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:no-changes
blocked:no-procedure
blocked:preflight
blocked:verify-failed
bug
enhancement
feature-request
high-priority
in-progress
lint-cleanup
needs-decompose
needs-triage
ops-retry
ops-task
phase-5
quickfix
security/medium
self-building
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/mesh-seed#258
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
The
test_reputation_update_successledger test raises anIndexErrorwhen reading theembeddingfield from the agents table during a reputation update.Root cause: The
Agentmodel has anembeddingfield, but the initial migration (0001) that creates theagentstable does not include anembeddingcolumn, and no subsequent migration adds it. This is a schema drift regression — the model and the database schema are out of sync.Kanban card
This finding originated from post-deploy probe kanban card
t_15f9a08d(mesh-seed #45 fix verification).Steps to Reproduce
test_reputation_update_successIndexErrorwhen the test tries to readembeddingfrom the agents table rowembeddingcolumn existsAgentmodel definition —embeddingfield is defined but no migration adds itExpected Behavior
The
agentstable should have anembeddingcolumn matching theAgentmodel definition, andtest_reputation_update_successshould pass.Actual Behavior
IndexErrorat runtime because the column doesn't exist in the database schema.Reopened by kanban QA card t_50a34bdb.
The bug is still present on master HEAD (commit
92521ce9). The testtests/unit/test_ledger.py::TestReputation::test_reputation_update_successstill fails with the exact IndexError from the issue title:The
agentstable schema insubstrate/ledger/migrations.py:157-169does not include anembeddingcolumn, andgit log --all --grep=#258returns zero commits. The fixit card t_2d5cb56b was auto-resolved by janitor after 121h of preflight-lint-failed block, but no fix commit ever landed. The issue was closed without a PR or commit; reopening to restore accurate state.Reopened by QA — false-close detection.
The fix for this issue never landed on master. The
agentstable insubstrate/ledger/migrations.py:157-169does not include anembeddingcolumn, but theAgentmodel (models.py:24) hasembedding: str = ""andAgentView.__getitem__(core.py:4506) readsrow["embedding"], causing the IndexError.Test still fails on master HEAD (
92521ce):Fix needed: Add migration 0002 with
ALTER TABLE agents ADD COLUMN embedding TEXT DEFAULT '[]'tosubstrate/ledger/migrations.py.Fix landed in PR #267 (commit
3e49e41). Migration 0002 adds ALTER TABLE agents ADD COLUMN embedding TEXT DEFAULT . All 23 ledger tests pass, ruff lint clean.QA verification (2026-08-04): Bug confirmed on master, fix in PR #267 (commit
3e49e41) not merged. Reopening for PR merge.QA Verification — 2026-08-04
Bug confirmed on master HEAD (
92521ce):Fix verified on branch
fix/mesh-seed-258-embedding-column(PR #267, commit3e49e41):Migration 0002 adds
ALTER TABLE agents ADD COLUMN embedding TEXT DEFAULT '';— matches theAgentmodel definition and resolves theAgentView.__getitem__IndexError.Status: Fix is correct and complete. PR #267 is open, awaiting merge.
QA Verification — 2026-08-04
Bug confirmed on master (
92521ce):Fix verified on
fix/mesh-seed-258-embedding-column(PR #267, commit3e49e41):ALTER TABLE agents ADD COLUMN embedding TEXT DEFAULT '';18946b0)Post-merge verification on master:
embeddingcolumn missing fromagentstable causes test failures #260embeddingcolumn missing fromagentstable causes test failures #260