Skip to content

Add good ideas from dead branches#1966

Merged
mscuthbert merged 4 commits into
masterfrom
branch_clean
Jul 1, 2026
Merged

Add good ideas from dead branches#1966
mscuthbert merged 4 commits into
masterfrom
branch_clean

Conversation

@mscuthbert

Copy link
Copy Markdown
Member

Some branches have had long-term experiments. Save good ideas from them as memories, but delete the branches instead.

…generic defaults

Record two abandoned-experiment findings in .agents/memory/ so future
agents don't re-tread them:

- sortedcontainers-for-streams: both attempts to make streams always-sorted
  via SortedList, and why it lost (too slow for tiny streams).
- stream-subclass-generic-defaults: the inherit-generics target shape, blocked
  on PEP 696 default type params; investigate typing_extensions.

AI-assisted (Claude)
Once core lives on Stream.core, two swappable StreamCore backends behind one
abstract interface (list-based for small streams, tree/sortedcontainer for
large) would suit each workload instead of forcing one container to win both.

AI-assisted (Claude)
@coveralls

coveralls commented Jun 30, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 93.297%. remained the same — branch_clean into master

Keep-the-list binary-search idea avoids the small-stream insertion cost that
sank sortedcontainers, but applied bisect with no length gate and only helps
the classList=None path; a list binary search won't beat the linear scan until
>~1000 elements, which real streams rarely reach. Conclusion: don't pursue
bisect-on-list; get fast big-stream lookup from the swappable-.core plan.

AI-assisted (Claude)
…ator memory

MockObjectProcessor.process counted notes with len(subStream.flatten().notesAndRests),
which materializes a throwaway flat Stream just to count; recurse() yields the same
notes lazily. Tiny unrelated win salvaged from the deleted flatIterator branch.

Also record the BFS-flatten-iterator idea: a lazy breadth-first flatten is worth
writing (likely for tree first) but must not reuse the flat/flatten name, which is
bound to offsetInHierarchy.

AI-assisted (Claude)
@mscuthbert mscuthbert merged commit 5bbf0ed into master Jul 1, 2026
6 checks passed
@mscuthbert mscuthbert deleted the branch_clean branch July 1, 2026 00:00
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.

2 participants