Sweep the last three uses of the columns SP8 dropped
`seed_demo.py` still passed `index=0` to `models.Action`, which raises `TypeError` now that the attribute is gone. Every call site inside `app/` was updated when the column went, but the seed script sits outside the package and was missed. `bundle.settle` wrote `memory_cursor` and `summary_cursor`, which are no longer mapped, so the assignments only set transient Python attributes. The version 2 branch existed solely to make those assignments, and it ran two queries per cursor to do it, so it goes. `settle` now returns early when the bundle carries anchors. The `db` parameter is unused after that. Also move the comment about deleted memories next to the `db.delete(branch)` it describes. Splitting the router package left it after the `finally`, where it read as attached to nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YFQY6WgaE3JaX3dXkxLynV
This commit is contained in:
co-authored by
Claude Opus 5
parent
20f0753277
commit
949f58a054
@@ -190,18 +190,15 @@ def delete_branch(
|
||||
stored_branch, _ = cursor.stored(adventure)
|
||||
if stored_branch in doomed:
|
||||
cursor.clear(adventure)
|
||||
# The deleted branch's memories are deleted with it, and their cached
|
||||
# vectors drop out of the catalogue on the next read, so no
|
||||
# invalidation call is needed. See the note on the `memorybank` cache.
|
||||
db.delete(branch)
|
||||
adventure.updated_at = models.utcnow()
|
||||
db.commit()
|
||||
finally:
|
||||
turns._active_turns.discard(adventure_id)
|
||||
|
||||
|
||||
# The deleted branch's memories are deleted with it, and their cached
|
||||
# vectors drop out of the catalogue on the next read, so no invalidation
|
||||
# call is needed. See the note on the `memorybank` cache.
|
||||
|
||||
|
||||
def _branch_subtree(
|
||||
db: Session, adventure: models.Adventure, root: models.Branch
|
||||
) -> set[int]:
|
||||
|
||||
Reference in New Issue
Block a user