Bootstrap: sections cannot reuse budget that recent memories leave unused
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 18/100
- Issue-Typ
- Refactoring
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- javascript, typescript
Rechercherichtung
Start in src/search.ts, in the else branch of the GET /Memory/bootstrap handler where renderBootstrapSections runs before recent is packed. Compare the two packing shapes the issue describes and read the orientationShare reservation logic in summary-tree before choosing one. Done means a bootstrap with a registered section and few recent memories fills the budget with section items, and heavy recent use still gets its current share.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem
GET /Memory/bootstrap packs in this order: pinned, needsReview, contributed sections, recent, relevant (src/search.ts, the else branch that calls renderBootstrapSections). A section is rendered with budgetChars = budget - used before recent is loaded and packed, so it cannot know how much room recent will actually use.
A section that wants to leave room for recent memories therefore has to reserve a fixed share. summary-tree 0.2.1 (HarperFast/summary-tree#5) caps orientation at orientationShare (default 0.5) of budgetChars. When recent memories are few or short, that reserved half goes unused and the bootstrap returns less than the budget allows.
Measured on the summary-tree eval at a 2,000-char budget: orientation covers 8 of 30 topics with the fixed share, against 16 of 30 when it could take the whole remaining budget.
Proposed direction
Let a section's unused reservation flow back, or let leftover budget flow to sections, instead of each section guessing a fixed share. Two shapes to compare:
- Pack recent before rendering sections. Load and pack
recent(perhaps capped at a share of the budget), then render sections with the true remainder. Cost: sections can no longer render concurrently with the recent load, which adds latency to every bootstrap that has a section. - Render sections with a soft and a hard budget. Sections return items in priority order; the server packs section items up to the soft share, packs
recent, then packs further section items into whatever is left. Keeps the concurrency, but changes the section render contract (items must be ordered and individually droppable, which the per-itemfitscheck already assumes).
Whichever shape is chosen, the per-item framing overhead from HarperFast/agent-memory#50 (itemOverheadChars) still applies.
Acceptance
- With a section registered and few recent memories, the bootstrap fills the budget with section items rather than leaving the section's reserved share empty.
- With many recent memories, recent still gets the share it gets today.
- summary-tree can drop or relax
orientationShareonce this lands.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 0
- Forks
- 0
- Ø Merge
- 20 Std. 29 Min.
- Gemergte PRs (30 T.)
- 28
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus HarperFast/agent-memory
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
HarperFast/agent-memory#17 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
HarperFast/agent-memory#53 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 52/100
HarperFast/agent-memory#48 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 65/100
HarperFast/agent-memory#47 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
HarperFast/agent-memory#43 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in HarperFast/agent-memory
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
ACK_WAITING HELP_WANTED UPDATE_CS
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
OWASP/CheatSheetSeries#3000 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
fishjar/kiss-translator#1381 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Client execution contract accepts a grant the code never takesEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenarea: client enhancement priority: medium
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
opensro-dev/opensro#3808 ·
Maintainer antworten meist innerhalb von 1 Tag