Fix duplicate session handling, unify legal references, and restore safe index cration#40
Fix duplicate session handling, unify legal references, and restore safe index cration#40div0-space wants to merge 9 commits into
Conversation
…gical session — freshest copy wins - aicx all -H 30 na żywym korpusie padoł na końcu biegu: 'duplicate canonical card id: card3:1980d570c88bce990c7e30e8' — ta samo logiczno sesjo odkryto z dwóch ścieżek fizycznych (np. live rollout + zarchiwizowano kopia) - root cause: ingested_session_ids (BTreeSet) dubla nie wstawiał, ale canonical_cards.extend() szedł per-źródło -> dwa komplety kart o identycznych content-derived id w projekcji - fix: order_sources_freshest_first (mtime desc, sort stabilny) + strażnik per-batch: druga kopia już-ingestowanej sesji -> drop liczony w duplicate_sources (NIE skip: nie trzymie watermarku, nie triggeruje retry) - summary raportuje duplicate_sources=N tylko gdy N>0 - test: duplicate_session_sources_are_ordered_freshest_first Authored-By: claude <agents@vetcoders.io> session_id: 49a84e4c-f24d-4167-9f55-ae0f8123a66f timestamp: 2026_0715_1540_CEST runtime: claude-code-interactive
* chore(legal): unify remaining BUSL identity strings to Libraxis AI Updates the remaining Vetcoders identity references in the BUSL parameter block (copyright line, competitive-offering clauses) in LICENSE and crates/aicx-parser/LICENSE to Libraxis AI sp. z o.o., matching the Licensor field updated in a prior commit. No other files touched. * chore(legal): use full legal entity name consistently in BUSL clauses --------- Co-authored-by: vetcoders-agents <agents@vetcoders.io> (cherry picked from commit d6fbd6b)
…edding (embed_batch, #29) Restore the #29 batched semantic-index build path on the current main structure, including cloud batch-size resolution, retry/per-item fallback, resume preservation, and focused regression tests. Authored-By: codex <agents@vetcoders.io> session_id: 90731f31-21ed-4c0c-a9e0-7b5d11bb2897 timestamp: 2026_0716_0058_CEST runtime: terminal (cherry picked from commit 7735b95)
…2E + document stable-sort invariant - odpowiedź na review PR #39 (Copilot: guard/licznik bez pokrycia): E2E dwa fizyczne pliki tej samej sesji logicznej (rozjechane body, mtime stale -1h) -> ingested=1 duplicate_sources=1, watermark nietrzymany, manifest projekcji dokładnie 1 karta - sugestia Gemini sort_unstable_by ODRZUCONA z komentarzem w kodzie: stabilność je load-bearing (cp -p daje identyczne mtime; remis musi rozstrzygać porządek skanu deterministycznie, nie los) Authored-By: claude <agents@vetcoders.io> session_id: 49a84e4c-f24d-4167-9f55-ae0f8123a66f timestamp: 2026_0716_0112_CEST runtime: claude-code-interactive
…the product tree - plan bookkeeping (verifier verdicts) należy do canonical store artefaktów, nie do korzenia repo; treść przeniesiono do plans/regresja-0-9-3-naprawa/codex-C1-verifier-note.md (artifacts) Authored-By: claude <agents@vetcoders.io> session_id: 49a84e4c-f24d-4167-9f55-ae0f8123a66f timestamp: 2026_0716_0116_CEST runtime: claude-code-interactive
…with neutralized cwd paths
- C3 zneutralizowoł /Users/me/ -> /Users/tester/ w treści, ale nazwy
katalogów projektowych kodujóm cwd ('/'->'-') i zostały -Users-me-*:
katalog kodowoł "me", zapytanie pytało o "tester" -> false prune,
2 fejle cwd_prune_* (złapane gate'em liniowym, nie gate'ami cuta —
brief §5 nie gonił testów sessions: luka briefu, nie workera)
- wyrównane 3 zakodowane nazwy do -Users-tester-*
Authored-By: claude <agents@vetcoders.io>
session_id: 49a84e4c-f24d-4167-9f55-ae0f8123a66f
timestamp: 2026_0716_0128_CEST
runtime: claude-code-interactive
…ses junie Unwraps live Junie A2ux events and maps frozen block snapshots through the normative parser contract. Authored-By: junie <agents@vetcoders.io> session_id: cb82bd55-be45-4910-b88e-dc636eb0ad0d timestamp: 2026_0716_0241_CEST runtime: junie-idea-interactive Co-authored-by: Junie <junie@jetbrains.com>
There was a problem hiding this comment.
Code Review
This pull request introduces batched semantic-index embedding for the cloud backend, collapsing per-chunk latency by sending chunks in configurable batches (default 16) via the embed_batch API, with graceful fallback to serial embedding on failure. It also refactors session extraction to prioritize the freshest physical copy of a session and drop older duplicates, preventing duplicate canonical card projections. Additionally, it updates the JunieAdapter to parse new event kinds and handle live SessionA2uxEvent envelopes, cleans up legacy test paths and org names (e.g., replacing 'Szowesgad' with 'Sampleorg' and 'ScreenScribe' with 'Screenscribe'), and removes the deprecated vetcoders skill suite archive. There are no review comments to address.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Pull request overview
This PR restores multiple non-parser capabilities that regressed during the earlier parser-transplant baseline divergence, including performant batched semantic-index embedding, correct legal identity strings across license surfaces, and safer index checkpoint resume behavior; it also reintroduces duplicate physical session source handling and expands Junie parsing support while deprivatizing fixtures and removing an obsolete archived skill tree.
Changes:
- Restore batched semantic-index embedding (configurable batch sizing + retry/fallback) and ensure
.tmpcheckpoint resume takes precedence over incremental seeding. - Fix duplicate physical session-source ingestion (freshest-first ordering + per-batch duplicate drop counting) with new E2E/runtime tests.
- Unify legal/security references and deprivatize fixtures/tests (including removal of the pre-rebrand
archive/skillstree).
Reviewed changes
Copilot reviewed 56 out of 57 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/runtime_cli_store_contract.rs | Adds E2E runtime test ensuring duplicate physical session sources are dropped and counted without holding watermark. |
| tests/retrieval_eval/search_quality_seed.toml | Updates brand casing references in retrieval-eval seed comments. |
| tests/retrieval_eval/golden_questions_draft.md | Updates brand casing references in retrieval-eval draft documentation. |
| tests/operator_md_ingest.rs | Updates fixtures/paths to deprivatized “Screenscribe” casing and cwd strings. |
| tests/fixtures/parser_engine/junie/session-a2ux-live/events.jsonl | Adds Junie A2ux live-envelope fixture for adapter coverage. |
| src/vector_index.rs | Restores batched embedding path, adds batch fallback helper, and fixes resume-checkpoint precedence during index build. |
| src/validation.rs | Updates examples/tests to use neutralized org bucket name. |
| src/steer_index/tests.rs | Deprivatizes fixture cwd path. |
| src/sessions.rs | Deprivatizes fixture paths and updates cwd-pruning tests accordingly. |
| src/rank.rs | Fixes brand casing in test fixtures/expected metadata. |
| src/main/tests.rs | Neutralizes org bucket fixtures used by index-status tests and deprivatizes repo path fixture. |
| src/main.rs | Updates quarantine help text example org name and emits duplicate_sources in session ingest summary when present. |
| src/intents/tests.rs | Deprivatizes fixture paths used in intent extraction tests. |
| src/extraction/tests.rs | Adds unit test for freshest-first ordering of duplicate session sources. |
| src/extraction/mod.rs | Implements freshest-first ordering, adds duplicate_sources accounting, and drops duplicates per-batch. |
| src/doctor/tests.rs | Neutralizes CamelCase corpus bucket fixtures from personal org to sample org. |
| src/doctor/checks.rs | Generalizes historical quarantine commentary to remove personal org reference. |
| src/api.rs | Deprivatizes fixture paths in API tests. |
| SECURITY.md | Updates advisory URL and security contact email to current project identity. |
| LICENSE | Updates BUSL licensor identity and related clauses to Libraxis AI sp. z o.o. |
| crates/aicx-parser/tests/junie_adapter.rs | Adds Junie A2ux live-envelope test verifying role/kind mapping and snapshot extraction. |
| crates/aicx-parser/src/adapters/junie.rs | Extends Junie adapter to handle A2ux envelope payloads, expands event-kind handling, and improves tool/result extraction. |
| crates/aicx-parser/LICENSE | Updates BUSL licensor identity and related clauses to Libraxis AI sp. z o.o. |
| crates/aicx-embeddings/src/lib.rs | Adds configurable embedding batch-size resolution (config+env), stores resolved batch size in engine, and adds resolver tests with env locking. |
| crates/aicx-embeddings/src/cloud.rs | Adds batch_size config field and defines default cloud embed batch constant. |
| CHANGELOG.md | Documents the batched semantic-index embedding change and fallback behavior. |
| archive/skills/vetcoders-workflow/SKILL.md | Removes obsolete archived skill content. |
| archive/skills/vetcoders-workflow/scripts/pipeline-init.sh | Removes obsolete archived script. |
| archive/skills/vetcoders-workflow/references/phase-research.md | Removes obsolete archived reference doc. |
| archive/skills/vetcoders-workflow/references/phase-implement.md | Removes obsolete archived reference doc. |
| archive/skills/vetcoders-workflow/references/phase-examine.md | Removes obsolete archived reference doc. |
| archive/skills/vetcoders-subagents/SKILL.md | Removes obsolete archived skill content. |
| archive/skills/vetcoders-spawn/SKILL.md | Removes obsolete archived skill content. |
| archive/skills/vetcoders-ship/SKILL.md | Removes obsolete archived skill content. |
| archive/skills/vetcoders-marbles/SKILL.md | Removes obsolete archived skill content. |
| archive/skills/vetcoders-init/SKILL.md | Removes obsolete archived skill content. |
| archive/skills/vetcoders-implement/SKILL.md | Removes obsolete archived skill content. |
| archive/skills/vetcoders-hydrate/SKILL.md | Removes obsolete archived skill content. |
| archive/skills/vetcoders-followup/SKILL.md | Removes obsolete archived skill content. |
| archive/skills/vetcoders-dou/SKILL.md | Removes obsolete archived skill content. |
| archive/skills/vetcoders-decorate/SKILL.md | Removes obsolete archived skill content. |
| archive/skills/README.md | Removes obsolete archived documentation. |
| archive/skills/pdf/SKILL.md | Removes obsolete archived pdf skill doc. |
| archive/skills/pdf/LICENSE.txt | Removes obsolete archived license file. |
| archive/skills/pdf/agents/openai.yaml | Removes obsolete archived agent descriptor. |
| archive/skills/loctree/SKILL.md | Removes obsolete archived loctree skill doc. |
| archive/skills/loctree/references/commands.md | Removes obsolete archived loctree reference doc. |
| archive/skills/docs/index.html | Removes obsolete archived static site content. |
| archive/skills/bravesearch/SKILL.md | Removes obsolete archived bravesearch skill doc. |
| archive/skills/ai-contexters/SKILL.md | Removes obsolete archived ai-contexters skill doc. |
| archive/skills/ai-contexters/references/commands.md | Removes obsolete archived command reference. |
| archive/skills/ai-contexters/references/architecture.md | Removes obsolete archived architecture reference. |
| archive/skills/_ARCHIVE_NOTE.md | Removes obsolete archived note describing the archived tree. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
This PR restores non-parser functionality that was lost when the AICX parser transplant was built and later squashed from a branch that had diverged from the canonical integration line.
The destructive parser cut itself did not directly delete these features. Its parent was
1b21c16(declaring AICX 0.10.0), but that branch had diverged fromdevelopand did not contain the relevant commits already present on canonicaldevelopat97d7b4c. The transplant subsequently carried selected stale non-parser surfaces into the main line. This was a baseline-selection and reconciliation failure, not an intentional product decision.The audit compared the missing integration-window commits against the post-transplant tree using commit history, reverse-apply checks, and live symbol/behavior probes. It confirmed three product regressions and repaired all three.
Restored regressions
1. Batched semantic-index embedding
Restores the
embed_batchpath in semantic-index construction, based on the original work from7735b95(#29).Without this path, index construction regressed to one embedding request per chunk. That is especially costly when indexes are hosted remotely and the embedder is reached over HTTP. The repaired implementation preserves the post-transplant vector-index structure while restoring batching instead of replacing the file with its historical version.
Delivery commit:
3998e2c(implemented by Codex; original change authored by Monika Szymanska).2. Correct BUSL licensor identity
Restores
Libraxis AI sp. z o.o.as the licensor in both license surfaces, based ond6fbd6b(#31). This is a legal identity correction, not a cosmetic branding change.Delivery commit:
9b0a38a, preserving the original authorship and cherry-pick provenance.3. Deprivatization and repository hygiene
Reapplies the relevant parts of
c0cca2band97d7b4c(#30/#32) to the post-transplant tree:/Users/me/fixture paths, including paths in the newly introducedsessions.rs;archive/skillstree (approximately 6.3k lines);Delivery commits:
42ee952,b21e8c4, and follow-up hardening3b658f2.Additional fixes included on this branch
This branch also contains the duplicate-session-source repair from #39:
6049e66: processes duplicate physical sources freshest-first and reportsduplicate_sources;5e81ffd: adds an end-to-end guard proving that the older duplicate is dropped without duplicating cards or entries;cp -p), so scan order must remain the deterministic tie-breaker.This PR therefore supersedes #39 once merged.
What the audit did not classify as lost
The audit also checked the other commits from the integration window. Search quality, intent taxonomy, MCP/streamable-HTTP support (#26), the macOS installer repair (#28), and the release-workflow core were still present after the transplant and are intentionally not recreated by this PR.
Verification completed
embed_batchis present on the active semantic-index construction path, not merely as a dead symbol;/Users/me/occurrences in the scoped source/test surfaces and no obsoletearchive/tree;Operational risk still being checked before merge
Because this PR changes the active embedding path, we are separately validating the deployed AICX embedder configuration on the
sztudiohost and exercising safe index rebuild/update behavior against that configuration. The PR should not be treated as cleared for merge until that operational check confirms that batching preserves index contents and does not trigger destructive replacement behavior.Process failure and prevention
This incident was not detected by the original scaffold doctor, implementation gates, pre-push checks, or the parser-focused audits because all of them verified behavior relative to the same divergent baseline. It was detected three days later through an operator-led capability audit.
Follow-up work is tracking a fail-closed foundation gate for Vibecrafted: every executable scaffold must name and fetch an explicit integration authority, prove ancestry, inventory missing commits/capabilities, bind the plan to a baseline receipt, and stop dispatch when the foundation is stale, divergent, ambiguous, or unverifiable.
Closes #39.