Repository navigation
Conversation
This was referenced Sep 25, 2026
Collaborator
|
stale, please open an issue with the problem instead |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A reply such as “I approve option 2” can lose its meaning when the options fall in the preceding extraction chunk. This draft adds an opt-in window of previous source text so extraction can resolve that reference while keeping the reply as its source chunk.
Related to #2551. The wider speaker and quoted-author attribution problem remains open. The counterbalanced reproduction and raw outputs motivated this candidate.
retain_context_chars, default0, bounded at32000. It can be set globally, per bank, or in a named retain strategy for selected items.The main tradeoff for review is full re-extraction, including repeated identical submissions and appends. Fine-grained context-dependent reuse is deferred. The window can begin mid-chunk, cannot resolve distant references outside its budget, and prompt instructions cannot guarantee zero prior-only fact leakage. The synthetic test does not establish broader attribution accuracy or production cost.
Validation of
339b165860e587a6af40fb9be3021923038e60f9:scripts/hooks/lint.shand APIty check hindsight_apipassed. The advisory unused-code scan completed with findings outside these changes.e78ceb632, all 265 control-plane tests passed under UTC and the production build passed. This follow-up changes Python only; those local UI checks were not repeated.CI for this head completed: 21 checks passed, 78 were skipped, and the sole failure is Hermes compatibility. Its log confirms the same missing
ruamelimport as on the baseline, before Hindsight is exercised. The blackbox system suite and generated-file verification passed. This PR does not change the Hermes setup or dependencies.Before implementation, the published experiment ran 24 dry-run extractions on Hindsight 0.10.1 with
gpt-5.6-luna; Codex scored the results without a separate judge-model call. The linked gist preserves that experiment’s prompts, runner and outputs. During implementation, two additional counterbalanced real-model tests usedgpt-5.6-lunaextraction and a separate Gemini judge; both passed the day/owner, target commitment and prior-only leakage checks. These are distinct experiments from before the review fixes, not fresh model evaluations of the final commit.AI assistance: task and verification
This disclosure covers the complete PR: investigating context loss in selected transcript/chat retains, testing the idea before implementation, building the default-off feature, completing its SDK/schema integration, and fixing regressions found by independent review. It follows the prompt-request disclosure pattern. The edited excerpts below show key instructions and decisions; other prose summarizes the work.
The user set the problem, requested the experiment and extraction model, directed the dedicated implementation handoff, flagged CI failures, and requested independent review restricted to PR-introduced defects. Codex proposed the supporting-context design and conservative full-re-extraction policy, wrote the implementation and tests, generated dependent artifacts, and applied the fixes. The planning and implementation session records identify their model as
gpt-6-astra. The extraction model and judge described above had separate evaluation roles.evie-kit is a toolkit for coordinating AI-assisted development across coding and review sessions. Here, its Hindsight client supplied the original experiment runner’s HTTP calls; its handoffs carried the task, constraints and evidence into the dedicated implementation session; and its review runner coordinated Codex and Claude Code alongside SonarQube and CodeRabbit and collected their reports. The coding-agent reviewers received separate contexts without each other’s findings. The coordinating agent reproduced and reconciled the findings before handing the confirmed regressions back for implementation.
evie-kit’s humanizer skill and deterministic style linter helped edit the public prose for clarity and remove formulaic wording. The toolkit ran from an external checkout; this PR adds no evie-kit dependency or project configuration to Hindsight. Implementation and follow-up verification used Git/GitHub CLI, pytest, Vitest, the project’s lint/type/build tools, and direct CodeRabbit reviews from the Codex session.
Authorized changes covered retain/storage/checkpoint behavior, configuration and UI mapping, regression tests and dependent SDK/schema/docs artifacts. Existing lint debt, the unrelated Hermes setup failure and a broad cache redesign stayed outside scope. The PR remains a bounded-context candidate for #2551; the wider attribution problem and maintainer design approval remain open.
Edited conversation excerpts (24–25 September 2026, UTC). Wording and punctuation have been adjusted for clarity and sentence case, preserving the original meaning and sequence. Labels identify the planning and implementation sessions.
1. Problem and proposed approach
User:
Agent (planning session):
2. Test the idea before implementation
User:
User:
Agent (planning session):
3. Move to a focused draft and choose the reuse policy
User:
Agent (planning session):
Agent (implementation session):
4. Correct omissions found by CI
User:
Agent (implementation session):
5. First independent review and scope of fixes
User:
User:
Agent (planning session):
Agent (planning session):
The excerpts end with the first review, which found four regressions despite passing targeted tests. At
5e0b48f, independent Codex Astra (gpt-6-astra, high), Claude Code Fable (claude-fable-5-1, high), SonarQube and CodeRabbit runs completed; the reconciled verdict requested changes for R1–R4. A second four-engine round ate78ceb632confirmed those fixes at the tested boundaries but found R5 (worker discovery/retry handling) and R6 (context windows changing with internal packing).The third round reviewed the full PR at
339b16586, prioritizing the latest fixes. All four engines completed, and reconciliation found no further required PR-introduced fixes. Astra established no actionable introduced defects; Fable’s remaining candidates were nonblocking or lacked a reachable supported failure; CodeRabbit reported no new findings. Sonar had zero open in-diff findings after the earlier reasoned acceptances, while its project-wide quality gate remained ERROR. This is an automated review result, not a GitHub approval or maintainer sign-off.Remaining review notes: legacy batches without fingerprints require fresh submission because checkpoint ownership cannot be proved safely. A warning and an exact older-checkpoint fixture would improve visibility, but the review found no resulting data-correctness defect. The full-base context-scanning performance suggestion and a Rust CLI convenience flag remain optional follow-ups. The earlier direct CodeRabbit concern about worker selection and reset races was confirmed at the PR base and remains outside the agreed scope.
Fixes and committed acceptance tests at
339b165860e587a6af40fb9be3021923038e60f9:The focused regressions can be rerun from
hindsight-api-slimwithpytest -n 0 tests/test_retain_source_context.py tests/test_retain_context_append.py tests/test_retain_context_batch_recovery.py tests/test_worker.py. SDK stories usepytest -c hindsight-system-tests/pyproject.toml hindsight-system-tests/tests/test_93_retain_source_context.pywith the suite's documented setup.Extraction recovery tests stub provider/storage boundaries. Worker recovery tests use real PostgreSQL and a stubbed provider; SDK stories exercise API persistence with a scripted LLM. No OS-level worker restart, live-provider batch, fresh Oracle or rendered-browser test was run in the final review. Legacy checkpoints without a fingerprint or an available serving account cannot establish ownership and require fresh submission. The full project suite and fresh real-model evaluation were not rerun for these mechanical fixes. Prompt-only leakage and full re-extraction cost remain limitations. All six required findings have regression coverage and passed the final review’s scoped checks. The PR is ready for maintainer review and remains a draft.