Skip to content

refactor: remove unnecessary complexity (ponytail review) - #27

Merged
philtief merged 5 commits into
mainfrom
refactor/ponytail-simplify
Oct 1, 2026
Merged

philtief merged 5 commits into
mainfrom
refactor/ponytail-simplify

Conversation

@philtief

@philtief philtief commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Removes unnecessary complexity found in a full-repo review. Every change preserves behavior; nothing user-facing changes except removing unused API surface.

Storage

  • SQLiteStore.write_page delegates to write_page_in_connection instead of carrying a second copy of the version, chunk and outbox writes. It keeps its superseded-page ValueError and the before_commit failpoint.
  • session_title and _snippet each have one implementation (previously duplicated between the SQLite and PostgreSQL stores).
  • acknowledge_outbox_batch returns cursor.rowcount.

Curation

  • _apply_patch builds kwargs once and makes one write call per store.
  • The curator run digest uses content_hash.
  • Smaller router, evidence and gateway helpers.

Remote

  • Archive payloads are mapped from aliased SELECT columns.
  • The batch digest uses dataclasses.asdict; it is byte-identical because _jsonable serializes UUIDs as str.
  • One archive_page helper replaces two copies.
  • RRF uses a fixed constant of 60.

Unused surface removed

  • WikiClient.sync_index, index_row_count, reconcile_vs_source and list_recent_by_cwd_tag, plus four ignored search keywords. No callers exist in the repo, hooks or scripts.
  • run_background_worker, the dotted env-key branch, and export_karpathy --limit.

Stdlib

  • asdict for to_dict, next() for first-match scans, and removesuffix.
  • Removes an unreachable bool branch.

The work was done by GLM 5.3 Flash workers, one per file slice; I reviewed every diff and made small follow-up fixes.

Validation:

  • ruff check: clean.
  • Full suite including PostgreSQL: 255 passed (same as main).
  • CI coverage gate: 87.54% (threshold 85%).

24 files changed, +157/−379.

This pull request and its description were written by Isaac.

philtief and others added 5 commits October 1, 2026 21:46
…lpers

write_page now delegates to write_page_in_connection; session_title and _snippet each have one implementation; acknowledge_outbox_batch uses rowcount.

Co-authored-by: Isaac <no-reply@databricks.com>
One write_page_in_connection call with shared kwargs, content_hash for run digests, and smaller router, evidence and gateway helpers.

Co-authored-by: Isaac <no-reply@databricks.com>
Aliased SELECTs with one row helper, asdict for the batch digest, a shared archive_page helper, and a fixed RRF constant.

Co-authored-by: Isaac <no-reply@databricks.com>
Drop four uncalled WikiClient methods, ignored search keywords, run_background_worker, the dotted env-key branch and the export --limit flag; map owned settings with a dict.

Co-authored-by: Isaac <no-reply@databricks.com>
asdict for to_dict, next() for first-match scans, removesuffix for the .md path, and drop an unreachable bool branch.

Co-authored-by: Isaac <no-reply@databricks.com>
@philtief
philtief merged commit 2256268 into main Oct 1, 2026
3 checks passed
@philtief philtief mentioned this pull request Oct 1, 2026
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