Skip to content
This repository was archived by the owner on Oct 13, 2026. It is now read-only.

V2 re-baseline batch: upstream delivery ports + D-ARCH-1/2/3 + how-long-ago fix (merge gated on the paired V2 run) - #190

Merged
100yenadmin merged 10 commits into
mainfrom
batch/v2-rebaseline
Jul 30, 2026
Merged

100yenadmin merged 10 commits into
mainfrom
batch/v2-rebaseline

Conversation

@100yenadmin

@100yenadmin 100yenadmin commented Jul 30, 2026 •

Copy link
Copy Markdown
Owner

The single delivery-affecting batch (per D-ARCH-2's sequencing clause)

Five units, built to bench/DECISIONS-R3-UPSTREAM-ARCH.md with zero decision deviations (BATCH-REPORT.md in the tree has the full port table and per-unit test commands):

  1. Six upstream follow-up ports (validate-then-port from upstream-wave-1 a53276c + ae0f068 — a blind cherry-pick conflicts because main diverged via perf(vector): fast-scan — vectorized loader + int8 residency (#171 reframed) #184; every fix was validated against current main first; the vector_store deadline-COUNT fix was adapted to all six current scan paths).
  2. D-ARCH-1: event dedupe counts what is date-distinguishable; finite_coverage certifies only fully-dated counts.
  3. D-ARCH-2: adjacency reserve is a priority carve-out, not a quota — unused reserve backfills from ranked candidates; limit=16 always fills when candidates exist.
  4. D-ARCH-3: engine-owned occurrence sidecar is the sole date-anchor trust root; caller anchors accepted only on agreement; sidecar-absent results marked low-trust.
  5. how-long-ago operand fix (upstream batch-2 finding via upstream #436 triage: six default-off/edge findings awaiting design decisions (babysit-lane backlog) #180): one evidence operand + the question-date anchor.

Measurement contract (declared up front)

  • Merge is GATED on the pre-registered paired V2 run (control = main, treatment = this branch; INSTRUMENT: V2 harness scores 0 on EMPTY reader responses (HTTP 524, no retry) — 7/451 rows of bench-H6-P4-298 never saw a real reader #166 harness retry applies to BOTH arms; registration via bench/tools/pairedgate before the run; delivery profiles captured both arms via bench/tools/deliveryprofile). D-ARCH-2 changes delivered composition BY DESIGN — the paired run is the acceptance evidence, not CI.
  • §6e.16 note (vector_store is the F44 gate-measured surface): the only vector_store change removes the post-deadline-expiry COUNT(*) — not the measured path (F44 run had zero deadline expiries; the F42-era live-path telemetry-as-tests pass). Per the twice-proven rule this claim will be MEASURED, not predicted: the single-rung latency/parity probe runs on this tree and its numbers get posted here before merge.
  • A V1 sanity slice runs at the batch boundary (red-team amendment 4).

Validation so far: 81 spec-acceptance tests + 166 upstream-affected-file tests + focused suites green (agent-stub recipe); Ruff clean.

Summary by CodeRabbit

  • New Features

    • “How long ago” now honors engine-trusted session-date anchors, supports adaptive interval units (including auto/year), and surfaces temporal trust/certification in results.
    • Compute/recall responses now include temporal-trust details, and recall occurrence-time can round-trip unchanged into compute.
    • Trajectory delivery can backfill remaining capacity while preserving ordering and match labeling.
  • Bug Fixes

    • Finite coverage/counting now certifies by distinct exact_ref and treats undated/unknown-time as uncertified.
    • Query view hit handling revalidates freshness and won’t let cleanup override publish failures.
    • Bounded vector scans omit totals when stopped by caller deadline expiry.
  • Documentation

    • Updated V2 batch re-baseline validation report.
  • Tests

    • Expanded temporal-trust, deduplication, backfill, query lifecycle, and deadline regressions, plus deadline/total-count vector-store coverage.

#184-aware) + D-ARCH-1 event-dedupe certification + D-ARCH-2 adjacency-reserve backfill + D-ARCH-3 engine-owned date anchors + how-long-ago operand fix
@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: dbcd7179-da17-4a98-bf5a-c5b5cb9baf6f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR updates finite evidence certification, temporal grounding, query-view persistence, bounded KNN accounting, trajectory-store behavior, and validation reporting. It adds regression coverage for duplicate evidence, sidecar dates, concurrent view changes, deadline handling, adjacency backfill, schema mismatches, and validation results.

Changes

V2 behavior updates

Layer / File(s) Summary
Finite evidence enumeration and certification
evidence_compiler.py, requirements_compiler.py, tests/test_evidence_*.py
Finite counts use distinct evidence refs and date-aware event keys; undated or unavailable events produce uncertified coverage with computation results.
Temporal sidecar grounding and compute output
reasoning.py, tools.py, schemas.py, tests/test_reasoning.py, tests/test_lcm_recall.py
Occurrence resolution reads engine session-date sidecars, aggregates temporal trust metadata, supports adaptive “how long ago” planning, bounds caller dates, and exposes certification in compute and recall results.
Evidence persistence and query-view hit confirmation
adaptive_retrieval.py, query_view_store.py, tests/test_adaptive_retrieval.py, tests/test_query_view_store.py
Persisted coverage includes only selected refs, cleanup failures preserve the original build error, and hit confirmation rechecks view generation after updates.
Bounded KNN accounting
vector_store.py, tests/test_vector_store.py, tests/test_chunk_vector_store.py, tests/test_int8_two_stage_knn.py, tests/test_prescreen_flip_blackout.py
Caller-deadline paths suppress total-count queries and omit bounded totals, while budget-limited and complete final-batch paths retain total accounting.
Trajectory schema validation and adjacency backfill
trajectory_store.py, tests/test_trajectory_store.py
Trajectory stores reject mismatched schemas before initialization, and adjacent-result queries backfill ranked candidates while respecting diversity limits.
Trajectory composition expectations
tests/test_trajectory_composition_policies.py, tests/test_trajectory_state_semantic_expansion.py
Tests now expect default adjacency backfill, policy-protected lexical winners, and semantic expansion that preserves existing result order.
Re-baseline validation record
BATCH-REPORT.md
The report records the baseline, port dispositions, unit and affected-file results, CI fixes, lint status, decision fidelity, and proof boundary.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant lcm_compute
  participant ground_evidence
  participant resolve_occurrence_time_with_trust
  participant EngineSidecar
  lcm_compute->>ground_evidence: pass engine context
  ground_evidence->>resolve_occurrence_time_with_trust: resolve occurrence time
  resolve_occurrence_time_with_trust->>EngineSidecar: read session date
  EngineSidecar-->>resolve_occurrence_time_with_trust: sidecar date and trust
  resolve_occurrence_time_with_trust-->>ground_evidence: grounded temporal metadata
  ground_evidence-->>lcm_compute: temporal trust and certification
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.16% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is specific and accurately summarizes the main batch: upstream ports, D-ARCH changes, and the how-long-ago fix.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch batch/v2-rebaseline

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Comment @coderabbitai help to get the list of available commands.

@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

evaOS review status: completed

PR: #190 - V2 re-baseline batch: upstream delivery ports + D-ARCH-1/2/3 + how-long-ago fix (merge gated on the paired V2 run)
Head: 44ace567b3246f415ef9051b0ab063b7c94a3169
Updated: 2026-07-30T04:30:19.304Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #190

Review URL: #190 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #190 - V2 re-baseline batch: upstream delivery ports + D-ARCH-1/2/3 + how-long-ago fix (merge gated on the paired V2 run)
Head: 44ace567b3246f415ef9051b0ab063b7c94a3169 into main. Review event: COMMENT.
Provider: Unregistered provider id (builtin:zai-coding-plan, zcode (registry miss), model unknown).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
BATCH-REPORT.md added +111/-0 Documentation Low
adaptive_retrieval.py modified +11/-2 Changed file Low
evidence_compiler.py modified +1/-1 Changed file Moderate: validated P3 finding
query_view_store.py modified +33/-3 Changed file Low
reasoning.py modified +121/-12 Changed file Low
requirements_compiler.py modified +62/-29 Changed file Moderate: validated P2 finding
tests/test_adaptive_retrieval.py modified +76/-0 Test coverage Low
tests/test_evidence_compiler.py modified +23/-0 Test coverage Low
tests/test_evidence_contract.py modified +63/-9 Test coverage Low
tests/test_int8_two_stage_knn.py modified +8/-1 Test coverage Low
tests/test_prescreen_flip_blackout.py modified +7/-0 Test coverage Low
tests/test_query_view_store.py modified +28/-0 Test coverage Low
tests/test_reasoning.py modified +121/-0 Test coverage Low
tests/test_trajectory_store.py modified +147/-0 Test coverage Low
tests/test_vector_store.py modified +67/-2 Test coverage Low
tools.py modified +9/-0 Changed file Moderate: validated P3 finding
trajectory_store.py modified +28/-0 Changed file Low
vector_store.py modified +8/-10 Changed file Low

Review Signal

Validated inline findings: 3 (P0: 0, P1: 0, P2: 1, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Proof gap: 2
  • Runtime correctness: 1

Validation and Proof

No required validation recommendation selected; rely on existing GitHub checks and human review.
Proof status: not_applicable - No required behavior proof selected for this changed surface.
Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #184, #180, #166.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread requirements_compiler.py Resolved
Comment thread evidence_compiler.py Resolved
Comment thread tools.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 44ace567b3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread requirements_compiler.py Resolved
Comment thread reasoning.py Resolved
Comment thread requirements_compiler.py Resolved
@100yenadmin

Copy link
Copy Markdown
Owner Author

§6e.16 probe evidence (measured, as promised in the PR body — the F44-surface claim is no longer a prediction):

  • Hit path: 0 resident hit-path SQL / 0 COUNT(*) / 0 scan SQL on BOTH trees (the F43 O(1) hit-path property holds); warm-hit p50 3.2ms summary / 32.2ms chunk on the batch tree (control: 6.2 / 40.0).
  • Full scan: 44.5ms summary / 144.2ms chunk @ 19,829 rung on the batch tree (control: 57.0 / 178.6) — inside the F44 envelope; the deadline-COUNT removal costs nothing on the measured path.
  • Recall parity: top-25 IDs RANK-IDENTICAL on 10/10 probe queries (25/25 set overlap each).
  • Discipline: private store copies, storefreeze pre/post all-clean, env pinned (LCM_FTS_INTEGRITY_CHECK_INTERVAL_HOURS=-1), zero LLM. Full tables: session-notes/2026-07-30/hermes-pr190-probe/artifacts/PROBE-190-EVIDENCE.md (target 44ace56 vs control main@e5acbbf).

No #171-gate re-run required: the only vector_store change is post-deadline-expiry bookkeeping, now shown measured-equivalent on the gate surface. The CI-red fix round (deadline-guard narrowing + D-ARCH-2 contract test updates) is in flight and will re-validate this probe's tree state if vector_store changes again.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@BATCH-REPORT.md`:
- Around line 27-30: Update every validation command in BATCH-REPORT.md to use
the repository-relative PYTHONPATH invocation, such as PYTHONPATH=. python3 -m
pytest, instead of the author-specific /Volumes/... path. Apply this
consistently to all listed command blocks while preserving their pytest targets
and options.

In `@query_view_store.py`:
- Line 1023: The delta_required construction is duplicated between the pre-check
staleness path and the post-update hit-confirmation path. Extract a shared
helper near the relevant query-view logic, such as _delta_required, to fetch
delta_events, conditionally shape the view using row/version/dependencies and
expected_version, and return QueryViewLookup; replace both duplicated blocks
while preserving their distinct reasons and arguments.

In `@trajectory_store.py`:
- Around line 629-636: Update _validate_existing_schema_version to suppress
sqlite3.OperationalError only when the lcm_trajectory_corpora table is absent;
propagate errors such as a missing schema_version column or other
malformed-table failures. Keep the existing successful query and no-side-effects
preflight behavior unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a10352fc-6d11-4e61-9047-389c7fa0c878

📥 Commits

Reviewing files that changed from the base of the PR and between e5acbbf and 44ace56.

📒 Files selected for processing (18)
  • BATCH-REPORT.md
  • adaptive_retrieval.py
  • evidence_compiler.py
  • query_view_store.py
  • reasoning.py
  • requirements_compiler.py
  • tests/test_adaptive_retrieval.py
  • tests/test_evidence_compiler.py
  • tests/test_evidence_contract.py
  • tests/test_int8_two_stage_knn.py
  • tests/test_prescreen_flip_blackout.py
  • tests/test_query_view_store.py
  • tests/test_reasoning.py
  • tests/test_trajectory_store.py
  • tests/test_vector_store.py
  • tools.py
  • trajectory_store.py
  • vector_store.py
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: test (3.11)
  • GitHub Check: test (3.12)
  • GitHub Check: test (3.14)
  • GitHub Check: test (3.13)
🧰 Additional context used
🪛 LanguageTool
BATCH-REPORT.md

[style] ~104-~104: ‘first priority’ might be wordy. Consider a shorter alternative.
Context: ...e=false`. - D-ARCH-2: adjacency remains first priority for its reserve; unused slots return to...

(EN_WORDINESS_PREMIUM_FIRST_PRIORITY)

🔇 Additional comments (32)
BATCH-REPORT.md (1)

1-26: LGTM!

Also applies to: 31-36, 41-46, 51-56, 61-66, 71-76, 81-84, 89-92, 97-111

trajectory_store.py (2)

595-595: LGTM!


3820-3832: LGTM!

tests/test_trajectory_store.py (1)

15-15: LGTM!

Also applies to: 110-177, 263-288, 468-519

vector_store.py (2)

2974-2977: LGTM!

Also applies to: 3012-3016, 3082-3085, 3123-3127, 3180-3181


3725-3728: LGTM!

Also applies to: 3767-3770, 3826-3829, 3864-3869, 3909-3910

tests/test_int8_two_stage_knn.py (1)

259-265: LGTM!

Also applies to: 280-280

tests/test_prescreen_flip_blackout.py (1)

205-211: LGTM!

tests/test_vector_store.py (1)

700-745: LGTM!

Also applies to: 1448-1464, 1475-1475, 1568-1577, 1589-1589, 1615-1631, 1643-1643

tests/test_evidence_compiler.py (1)

448-469: LGTM!

evidence_compiler.py (1)

1232-1240: LGTM!

requirements_compiler.py (2)

1646-1681: LGTM!

Also applies to: 1757-1810, 2182-2185


1825-1857: 🗄️ Data Integrity & Integration

No change needed here. ground_evidence preserves input order and returns one grounded operand per input item, so the zip(...) key reassignment is stable; the mixed dated/undated branch intentionally uses as_of=None and already downgrades the result to finite_count_uncertified_undated_events.

			> Likely an incorrect or invalid review comment.
tests/test_evidence_contract.py (1)

137-137: LGTM!

Also applies to: 162-179, 519-543, 560-565, 567-587, 887-915

adaptive_retrieval.py (2)

1212-1212: LGTM!

Also applies to: 1223-1226


1245-1253: LGTM!

tests/test_adaptive_retrieval.py (1)

275-349: LGTM!

tests/test_query_view_store.py (1)

267-293: LGTM!

reasoning.py (10)

16-16: LGTM!


209-224: LGTM! Clean, backward-compatible dataclass extension (new fields carry defaults at the tail of both GroundedEvidence and GroundingDecision).


426-433: LGTM! The specific \bhow long ago\b check correctly precedes the broader how long|time between|... regex at Line 433, so "how long ago" questions route to the new single-operand date_interval plan instead of the two-operand one — matches the new planner test and the PR's stated how-long-ago fix.


685-685: LGTM!


808-843: Sidecar-override handling traced and correct.

Walked through the sidecar-agrees, sidecar-disagrees, and no-sidecar cases against the new tests: occurrence_day/evidence_day correctly derive from the sidecar-anchored resolved["event_date"], and the event_date-mismatch rejection at Lines 836-840 is correctly bypassed only when session_date_overridden is true. No issues found.


850-861: LGTM! The occurrence_overridden short-circuit correctly defers to the sidecar-derived evidence_day (set upstream from occurrence_day) instead of overwriting it with an unverified caller-supplied date, while still enforcing the original quote/assertion-day check when no override is in effect.


881-884: LGTM! Deriving the source-observed day from resolved_occurrence.get("session_date") (the actual anchor used, sidecar-preferred) rather than the raw caller-supplied session date is consistent with the sidecar-trust-root design.


932-933: LGTM!


943-988: LGTM! The aggregation is straightforward: any low_trust operand pulls the whole decision to low_trust, otherwise any engine_sidecar operand certifies it, and notes are order-preserving deduped.


85-128: 🗄️ Data Integrity & Integration

Need a real producer for _session_occurrence_dates on LCMEngine.
This path drops to anchor_trust="low_trust" whenever the sidecar is missing, so the trust escalation only works if the engine sets that mapping on the live session bootstrap path.

tools.py (2)

694-700: LGTM! engine is correctly threaded into ground_evidence, and the new temporal_certified/temporal_trust fields in the selector stage and final response match the shape asserted in the new test_reasoning.py compute tests.

Also applies to: 751-760, 834-841


5548-5560: LGTM! engine=engine, session_id=hit.get("session_id") correctly mirrors the same pattern used in reasoning.py's _ground_one (session id sourced from the hit's own row rather than the current active session).

tests/test_reasoning.py (2)

86-93: LGTM! Correctly pins down the new single-operand date_interval plan for "how long ago" phrasing.


192-303: LGTM! Solid coverage of all three sidecar-trust states (agree, override, absent). The override note text (Lines 265-266) and low-trust note substring (Line 302) both match the exact f-string outputs in reasoning.py's resolve_occurrence_time.

Comment thread BATCH-REPORT.md Resolved
Comment thread query_view_store.py Resolved
Comment thread trajectory_store.py Resolved
…nded-but-not-expired scans keep total); composition tests updated to the D-ARCH-2 backfill contract with policy-specific promotions pinned
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

evaOS review status: completed

PR: #190 - V2 re-baseline batch: upstream delivery ports + D-ARCH-1/2/3 + how-long-ago fix (merge gated on the paired V2 run)
Head: cdc95c13e688cfa1b7af714c4d3a9661a65cf0a4
Updated: 2026-07-30T04:52:23.487Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #190

Review URL: #190 (review)

@100yenadmin

Copy link
Copy Markdown
Owner Author

§6e.16 probe RE-RUN on the fix-round head (cdc95c1, vector_store changed again): identical result — 0 resident hit-path SQL / 0 COUNT(*) on both trees, top-25 rank-identical vs the recorded control on all probe queries, measured-query p50 360ms (control 430ms). Store shas verified pre/post. Full tables: session-notes/2026-07-30/hermes-pr190-probe/artifacts/PROBE-190-EVIDENCE-R2.md. The F44-surface claim stays measured on the current head.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cdc95c13e6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread trajectory_store.py Resolved
Comment thread reasoning.py Resolved
Comment thread requirements_compiler.py Resolved

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #190 - V2 re-baseline batch: upstream delivery ports + D-ARCH-1/2/3 + how-long-ago fix (merge gated on the paired V2 run)
Head: cdc95c13e688cfa1b7af714c4d3a9661a65cf0a4 into main. Review event: COMMENT.
Provider: Unregistered provider id (builtin:zai-coding-plan, zcode (registry miss), model unknown).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
BATCH-REPORT.md added +152/-0 Documentation Low
adaptive_retrieval.py modified +11/-2 Changed file Low
evidence_compiler.py modified +1/-1 Changed file Low
query_view_store.py modified +33/-3 Changed file Low
reasoning.py modified +121/-12 Changed file Low
requirements_compiler.py modified +62/-29 Changed file Low
tests/test_adaptive_retrieval.py modified +76/-0 Test coverage Low
tests/test_evidence_compiler.py modified +23/-0 Test coverage Low
tests/test_evidence_contract.py modified +63/-9 Test coverage Low
tests/test_int8_two_stage_knn.py modified +8/-1 Test coverage Low
tests/test_prescreen_flip_blackout.py modified +7/-0 Test coverage Low
tests/test_query_view_store.py modified +28/-0 Test coverage Low
tests/test_reasoning.py modified +121/-0 Test coverage Low
tests/test_trajectory_composition_policies.py modified +29/-20 Test coverage Low
tests/test_trajectory_state_semantic_expansion.py modified +19/-8 Test coverage Low
tests/test_trajectory_store.py modified +147/-0 Test coverage Low
tests/test_vector_store.py modified +67/-2 Test coverage Low
tools.py modified +9/-0 Changed file Low
trajectory_store.py modified +28/-0 Changed file Low
vector_store.py modified +26/-17 Changed file Moderate: validated P2 finding

Review Signal

Validated inline findings: 1 (P0: 0, P1: 0, P2: 1, P3: 0).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Runtime correctness: 1

Validation and Proof

No required validation recommendation selected; rely on existing GitHub checks and human review.
Proof status: not_applicable - No required behavior proof selected for this changed surface.
Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #184, #180, #166.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread vector_store.py Resolved
…1 future-evidence leak); table-absent-only preflight suppression; zip strict; date-suffix survives key bounding; certification requires a parsed sidecar; dual dedupe-notion docs
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

evaOS review status: completed

PR: #190 - V2 re-baseline batch: upstream delivery ports + D-ARCH-1/2/3 + how-long-ago fix (merge gated on the paired V2 run)
Head: 0c8bea9a19e032b3b1261a8ff3d4931458228d92
Updated: 2026-07-30T05:12:19.496Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #190

Review URL: #190 (review)

@100yenadmin

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
requirements_compiler.py (1)

1830-1840: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Pass the engine into finite grounding.

ground_evidence() is called without engine=engine, so finite-enumeration operands cannot consume _session_occurrence_dates. Relative events can lose the engine-owned anchor and temporal certification on this path.

Proposed fix
     grounding = ground_evidence(
         raw_operands,
         messages=engine._store,
         assertions=getattr(engine, "_assertions", None),
         as_of=question_date_as_of_epoch(contract.question_as_of),
+        engine=engine,
     )
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@requirements_compiler.py` around lines 1830 - 1840, Update the
ground_evidence call in the finite-grounding flow to pass the current engine via
its engine parameter, preserving the existing store, assertions, and as_of
arguments so finite-enumeration operands can use _session_occurrence_dates and
retain the engine-owned temporal anchor.
trajectory_store.py (1)

3823-3835: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Preserve the ranked per-trajectory cap during reserve backfill.

Lines 3826-3835 append directly from rows without the diversity_cap or 5 limit enforced by _select_diverse. If adjacency yields no candidates, include_adjacent=True can exceed five hits from one trajectory and diverge from the ranked-only result. Track selected counts and skip ranked rows once their trajectory reaches the applicable cap.

Add a regression with more than five lexical candidates from one trajectory and no expandable neighbors.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@trajectory_store.py` around lines 3823 - 3835, Update the adjacency reserve
backfill after _select_diverse to enforce the same per-trajectory cap
(diversity_cap or 5) as the ranked selection: track counts for selected rows by
trajectory and skip rows whose trajectory has reached its cap while filling from
rows. Add a regression covering more than five lexical candidates from one
trajectory with no expandable neighbors, ensuring include_adjacent=True matches
the ranked-only cap.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@BATCH-REPORT.md`:
- Around line 166-169: Reconcile the acceptance-suite totals in BATCH-REPORT.md:
align the line reporting 85 passed with the 81-passed totals at lines 84-87 and
135 by either correcting the count or documenting the four additional targets
that produce the difference, keeping the acceptance gate auditable.

---

Outside diff comments:
In `@requirements_compiler.py`:
- Around line 1830-1840: Update the ground_evidence call in the finite-grounding
flow to pass the current engine via its engine parameter, preserving the
existing store, assertions, and as_of arguments so finite-enumeration operands
can use _session_occurrence_dates and retain the engine-owned temporal anchor.

In `@trajectory_store.py`:
- Around line 3823-3835: Update the adjacency reserve backfill after
_select_diverse to enforce the same per-trajectory cap (diversity_cap or 5) as
the ranked selection: track counts for selected rows by trajectory and skip rows
whose trajectory has reached its cap while filling from rows. Add a regression
covering more than five lexical candidates from one trajectory with no
expandable neighbors, ensuring include_adjacent=True matches the ranked-only
cap.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b26f94a2-0244-46a5-a2d2-92a8d99f0d52

📥 Commits

Reviewing files that changed from the base of the PR and between cdc95c1 and 0c8bea9.

📒 Files selected for processing (8)
  • BATCH-REPORT.md
  • evidence_compiler.py
  • reasoning.py
  • requirements_compiler.py
  • tests/test_evidence_contract.py
  • tests/test_reasoning.py
  • tests/test_trajectory_store.py
  • trajectory_store.py
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: test (3.13)
  • GitHub Check: test (3.12)
  • GitHub Check: test (3.14)
  • GitHub Check: test (3.11)
🧰 Additional context used
🪛 LanguageTool
BATCH-REPORT.md

[style] ~158-~158: Consider using the typographical ellipsis character here instead.
Context: ... the grounding/operand pairing now uses zip(..., strict=True), so cardinality drift fa...

(ELLIPSIS)

🔇 Additional comments (7)
requirements_compiler.py (1)

959-976: LGTM!

Also applies to: 1648-1684, 1760-1815

evidence_compiler.py (1)

1233-1242: LGTM!

tests/test_evidence_contract.py (1)

163-184: LGTM!

Also applies to: 548-649, 960-982

reasoning.py (1)

85-134: LGTM!

tests/test_reasoning.py (1)

306-320: LGTM!

BATCH-REPORT.md (2)

25-27: Make AGENT_STUB_PATH reproducible.

The commands now avoid a hard-coded machine path, but ${AGENT_STUB_PATH} is not defined in the report. In a standalone checkout, an unset variable expands to an empty PYTHONPATH, so these commands are still not directly replayable. Define the variable in the documented setup or use a repository-relative/importable invocation.

Also applies to: 34-34, 44-44, 54-54, 64-64, 74-74, 84-85, 92-92, 130-130, 162-162


146-161: LGTM!

Also applies to: 170-171, 173-175

Comment thread BATCH-REPORT.md Resolved

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #190 - V2 re-baseline batch: upstream delivery ports + D-ARCH-1/2/3 + how-long-ago fix (merge gated on the paired V2 run)
Head: 0c8bea9a19e032b3b1261a8ff3d4931458228d92 into main. Review event: COMMENT.
Provider: Unregistered provider id (builtin:zai-coding-plan, zcode (registry miss), model unknown).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
BATCH-REPORT.md added +187/-0 Documentation Low
adaptive_retrieval.py modified +11/-2 Changed file Low
evidence_compiler.py modified +3/-1 Changed file Low
query_view_store.py modified +33/-3 Changed file Low
reasoning.py modified +127/-12 Changed file Low
requirements_compiler.py modified +70/-36 Changed file Moderate: validated P2 finding
tests/test_adaptive_retrieval.py modified +76/-0 Test coverage Low
tests/test_evidence_compiler.py modified +23/-0 Test coverage Low
tests/test_evidence_contract.py modified +133/-12 Test coverage Low
tests/test_int8_two_stage_knn.py modified +8/-1 Test coverage Low
tests/test_prescreen_flip_blackout.py modified +7/-0 Test coverage Low
tests/test_query_view_store.py modified +28/-0 Test coverage Low
tests/test_reasoning.py modified +139/-0 Test coverage Low
tests/test_trajectory_composition_policies.py modified +29/-20 Test coverage Low
tests/test_trajectory_state_semantic_expansion.py modified +19/-8 Test coverage Low
tests/test_trajectory_store.py modified +168/-0 Test coverage Low
tests/test_vector_store.py modified +67/-2 Test coverage Low
tools.py modified +9/-0 Changed file Low
trajectory_store.py modified +31/-0 Changed file Low
vector_store.py modified +26/-17 Changed file Moderate: validated P2 finding

Review Signal

Validated inline findings: 2 (P0: 0, P1: 0, P2: 2, P3: 0).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Runtime correctness: 2

Validation and Proof

No required validation recommendation selected; rely on existing GitHub checks and human review.
Proof status: not_applicable - No required behavior proof selected for this changed surface.
Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #184, #180, #166.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread vector_store.py Resolved
Comment thread requirements_compiler.py Resolved
…CH-1 honesty clause); reserve backfill respects the diversity cap; explicit units honored; caller-deadline deconflated from relative budget (budget-bounded scans keep total); temporal_certified tri-state documented+consumer-verified
@100yenadmin

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@100yenadmin

Copy link
Copy Markdown
Owner Author

§6e.16 probe r3 (head 76ba0f6, after the caller-deadline deconflation): unchanged — 0 hit-path SQL / 0 COUNT(*), top-25 rank-identical vs the recorded control on all probe queries, measured p50 350ms (control 430ms). Evidence: session-notes/2026-07-30/hermes-pr190-probe/artifacts/PROBE-190-EVIDENCE-R3.md. The F44-surface property has now been re-measured on every head that touched vector_store (r1/r2/r3).

@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

evaOS review status: completed

PR: #190 - V2 re-baseline batch: upstream delivery ports + D-ARCH-1/2/3 + how-long-ago fix (merge gated on the paired V2 run)
Head: 76ba0f695f37e55ee73047a957d6814da33ff29c
Updated: 2026-07-30T05:32:21.946Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #190

Review URL: #190 (review)

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #190 - V2 re-baseline batch: upstream delivery ports + D-ARCH-1/2/3 + how-long-ago fix (merge gated on the paired V2 run)
Head: 76ba0f695f37e55ee73047a957d6814da33ff29c into main. Review event: COMMENT.
Provider: Unregistered provider id (builtin:zai-coding-plan, zcode (registry miss), model unknown).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
BATCH-REPORT.md added +224/-0 Documentation Elevated: large change
adaptive_retrieval.py modified +11/-2 Changed file Low
evidence_compiler.py modified +3/-1 Changed file Low
query_view_store.py modified +33/-3 Changed file Low
reasoning.py modified +172/-28 Changed file Elevated: large change
requirements_compiler.py modified +100/-44 Changed file Low
tests/test_adaptive_retrieval.py modified +76/-0 Test coverage Low
tests/test_evidence_compiler.py modified +23/-0 Test coverage Low
tests/test_evidence_contract.py modified +135/-12 Test coverage Low
tests/test_int8_two_stage_knn.py modified +8/-1 Test coverage Low
tests/test_prescreen_flip_blackout.py modified +7/-0 Test coverage Low
tests/test_query_view_store.py modified +28/-0 Test coverage Low
tests/test_reasoning.py modified +203/-0 Test coverage Elevated: large change
tests/test_trajectory_composition_policies.py modified +29/-20 Test coverage Low
tests/test_trajectory_state_semantic_expansion.py modified +19/-8 Test coverage Low
tests/test_trajectory_store.py modified +232/-0 Test coverage Elevated: large change
tests/test_vector_store.py modified +65/-1 Test coverage Low
tools.py modified +12/-0 Changed file Low
trajectory_store.py modified +47/-6 Changed file Low
vector_store.py modified +90/-25 Changed file Low

Review Signal

No validated inline findings.
Dropped findings before posting: 2. High-severity findings: 0.

Risk Taxonomy

No finding categories.

Validation and Proof

No required validation recommendation selected; rely on existing GitHub checks and human review.
Proof status: not_applicable - No required behavior proof selected for this changed surface.
Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #184, #180, #166.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 76ba0f695f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread reasoning.py Resolved
Comment thread requirements_compiler.py Resolved
Comment thread tools.py Resolved
Comment thread reasoning.py Resolved
…=full+total; unavailable-as-of clauses excluded individually (never abort valid enumeration); report count chronology reconciled
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

evaOS review status: completed

PR: #190 - V2 re-baseline batch: upstream delivery ports + D-ARCH-1/2/3 + how-long-ago fix (merge gated on the paired V2 run)
Head: 430a48df17acfa27436d3a4e7b4c001c0e51f7ae
Updated: 2026-07-30T05:41:14.107Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #190

Review URL: #190 (review)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
requirements_compiler.py (1)

1838-1840: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Pass the engine into finite-scan grounding.

The ground_evidence(...) call immediately above this changed pairing omits engine=engine, so _ground_one cannot consume engine._session_occurrence_dates. The later replace(..., key=...) only rewrites the dedupe key and cannot repair a sidecar/caller-date mismatch, causing finite counts and grounded temporal metadata to diverge.

Proposed fix
     grounding = ground_evidence(
         raw_operands,
         messages=engine._store,
         assertions=getattr(engine, "_assertions", None),
         as_of=question_date_as_of_epoch(contract.question_as_of),
+        engine=engine,
     )
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@requirements_compiler.py` around lines 1838 - 1840, Update the nearby
ground_evidence(...) call to pass the current engine via engine=engine, ensuring
_ground_one can access engine._session_occurrence_dates during finite-scan
grounding. Leave the subsequent computed_operands replace(..., key=...) pairing
unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@BATCH-REPORT.md`:
- Around line 197-198: Update the focused pytest command in the validation
documentation to use the repository-relative PYTHONPATH invocation, replacing
the operator-specific AGENT_STUB_PATH dependency while preserving the existing
test selections.
- Around line 200-205: Reconcile the Round-3 validation section by making the
reported totals match the commands and test targets shown around the “Round-3
acceptance proof” entries. Add the missing command and target details needed to
substantiate the 60-pass CI total, or correct that total to match the existing
11-pass command; separately document the 91-pass acceptance total and explain
its difference from the 81-test baseline.

In `@vector_store.py`:
- Around line 3124-3138: Consolidate the repeated deadline-aware scanned/total
calculation into one shared helper near the existing KNN result logic. Update
the exact-scan and candidate-enumeration branches in knn(), plus the mirrored
branches in knn_chunks(), to use that helper so scanned remains populated while
total is skipped whenever the caller deadline has expired, preserving the
existing bounded coverage and counting behavior.

---

Outside diff comments:
In `@requirements_compiler.py`:
- Around line 1838-1840: Update the nearby ground_evidence(...) call to pass the
current engine via engine=engine, ensuring _ground_one can access
engine._session_occurrence_dates during finite-scan grounding. Leave the
subsequent computed_operands replace(..., key=...) pairing unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7ba38b79-722a-4008-84f3-e34a5b4c810f

📥 Commits

Reviewing files that changed from the base of the PR and between 0c8bea9 and 76ba0f6.

📒 Files selected for processing (10)
  • BATCH-REPORT.md
  • reasoning.py
  • requirements_compiler.py
  • tests/test_evidence_contract.py
  • tests/test_reasoning.py
  • tests/test_trajectory_store.py
  • tests/test_vector_store.py
  • tools.py
  • trajectory_store.py
  • vector_store.py
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: test (3.11)
🔇 Additional comments (11)
BATCH-REPORT.md (1)

177-196: LGTM!

Also applies to: 206-213

requirements_compiler.py (2)

10-10: LGTM!

Also applies to: 959-976, 1648-1684, 1760-1792, 1801-1815


1842-1858: LGTM!

Also applies to: 1884-1911, 2199-2202, 2232-2238

tests/test_evidence_contract.py (1)

11-11: LGTM!

Also applies to: 138-138, 163-184, 524-574, 588-651, 951-984

reasoning.py (1)

16-16: LGTM!

Also applies to: 85-134, 159-159, 215-230, 431-448, 700-700, 823-827, 840-855, 865-876, 896-899, 947-948, 958-958, 973-1003, 1269-1310

tools.py (1)

696-699: LGTM!

Also applies to: 751-763, 840-844, 5558-5563

tests/test_reasoning.py (1)

22-22: LGTM!

Also applies to: 87-94, 193-230, 232-267, 268-289, 291-327, 329-363, 365-380, 697-701

vector_store.py (1)

60-71: LGTM!

Also applies to: 2260-2447

tests/test_vector_store.py (1)

1426-1484: LGTM!

Also applies to: 1553-1592

trajectory_store.py (1)

3765-3770: LGTM!

Also applies to: 3823-3846

tests/test_trajectory_store.py (1)

524-586: LGTM!

Comment thread BATCH-REPORT.md Resolved
Comment thread BATCH-REPORT.md Resolved
Comment thread vector_store.py Resolved
@100yenadmin

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c7547bf799

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread reasoning.py Resolved
Comment thread vector_store.py Resolved
Comment thread requirements_compiler.py Resolved
…action stems — negated statements never count as events; certificate initializes every_counted_event_dated on early returns
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

evaOS review status: completed

PR: #190 - V2 re-baseline batch: upstream delivery ports + D-ARCH-1/2/3 + how-long-ago fix (merge gated on the paired V2 run)
Head: cbdd4cc2b158c099407e5737c9011e7e11ecb574
Updated: 2026-07-30T07:43:11.015Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #190

Review URL: #190 (review)

@100yenadmin

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
requirements_compiler.py (1)

1824-1828: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep zero-event certificate flags false. all(...) returns True for an empty operand list, so an all-unavailable scan reports every_counted_event_dated=True despite having no counted events; this conflicts with the initialized early-return state.

  • requirements_compiler.py#L1824-L1828: return for an empty operands list before computing every_counted_event_dated.
  • tests/test_evidence_contract.py#L749-L770: assert every_counted_event_dated is False for the all-unavailable path.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@requirements_compiler.py` around lines 1824 - 1828, In
requirements_compiler.py lines 1824-1828, return the empty-operands result
before computing every_counted_event_dated so zero-event certificates retain a
false flag; update tests/test_evidence_contract.py lines 749-770 to assert
every_counted_event_dated is False for the all-unavailable path.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@requirements_compiler.py`:
- Around line 1701-1705: The negation detector in the event-assertion logic
overmatches unrelated clause tokens and abbreviated contractions. In
requirements_compiler.py lines 1701-1705, update the matching to recognize full
contractions and scope no, none, zero, and without to the event action or
requested unit; in tests/test_evidence_contract.py lines 679-710, add positive
regressions for unrelated “Don” and “no luggage” wording and coverage for
full-contraction cases.

---

Outside diff comments:
In `@requirements_compiler.py`:
- Around line 1824-1828: In requirements_compiler.py lines 1824-1828, return the
empty-operands result before computing every_counted_event_dated so zero-event
certificates retain a false flag; update tests/test_evidence_contract.py lines
749-770 to assert every_counted_event_dated is False for the all-unavailable
path.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0ef9ad3b-5ee8-4fa5-ba53-1173f10e17ce

📥 Commits

Reviewing files that changed from the base of the PR and between c7547bf and cbdd4cc.

📒 Files selected for processing (2)
  • requirements_compiler.py
  • tests/test_evidence_contract.py
📜 Review details
🔇 Additional comments (2)
requirements_compiler.py (1)

10-10: LGTM!

Also applies to: 959-976, 1648-1691, 1744-1745, 1773-1805, 1814-1823, 1846-1876, 1902-1929, 2217-2221, 2251-2257

tests/test_evidence_contract.py (1)

11-11: LGTM!

Also applies to: 138-138, 163-184, 524-577, 580-677, 713-748, 1070-1103

Comment thread requirements_compiler.py Resolved

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #190 - V2 re-baseline batch: upstream delivery ports + D-ARCH-1/2/3 + how-long-ago fix (merge gated on the paired V2 run)
Head: cbdd4cc2b158c099407e5737c9011e7e11ecb574 into main. Review event: COMMENT.
Provider: Unregistered provider id (builtin:zai-coding-plan, zcode (registry miss), model unknown).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
BATCH-REPORT.md added +365/-0 Documentation Elevated: large change
adaptive_retrieval.py modified +20/-2 Changed file Low
evidence_compiler.py modified +3/-1 Changed file Low
query_view_store.py modified +54/-6 Changed file Low
reasoning.py modified +271/-26 Changed file Elevated: large change
requirements_compiler.py modified +122/-47 Changed file Moderate: validated P2 finding
schemas.py modified +4/-1 Changed file Low
tests/test_adaptive_retrieval.py modified +160/-6 Test coverage Low
tests/test_chunk_vector_store.py modified +74/-0 Test coverage Low
tests/test_evidence_compiler.py modified +23/-0 Test coverage Low
tests/test_evidence_contract.py modified +254/-12 Test coverage Moderate: validated P3 finding
tests/test_int8_two_stage_knn.py modified +8/-1 Test coverage Low
tests/test_lcm_recall.py modified +75/-0 Test coverage Low
tests/test_prescreen_flip_blackout.py modified +7/-0 Test coverage Low
tests/test_query_view_store.py modified +49/-0 Test coverage Low
tests/test_reasoning.py modified +269/-0 Test coverage Elevated: large change
tests/test_trajectory_composition_policies.py modified +29/-20 Test coverage Low
tests/test_trajectory_state_semantic_expansion.py modified +19/-8 Test coverage Low
tests/test_trajectory_store.py modified +232/-0 Test coverage Elevated: large change
tests/test_vector_store.py modified +196/-1 Test coverage Low
tools.py modified +21/-2 Changed file Low
trajectory_store.py modified +47/-6 Changed file Low
vector_store.py modified +139/-55 Changed file Low

Review Signal

Validated inline findings: 4 (P0: 0, P1: 0, P2: 1, P3: 3).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • API compatibility: 1
  • Runtime correctness: 3

Validation and Proof

No required validation recommendation selected; rely on existing GitHub checks and human review.
Proof status: not_applicable - No required behavior proof selected for this changed surface.
Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #184, #180, #166.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread requirements_compiler.py Resolved
Comment thread requirements_compiler.py Resolved
Comment thread tests/test_evidence_contract.py Resolved
Comment thread requirements_compiler.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cbdd4cc2b1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread requirements_compiler.py Resolved
Comment thread reasoning.py Resolved
…ons only; incidental negatives and proper nouns pass); availability falls through without observed_at; postdated guard precedes epoch return; open-cardinality disclosure asserted; Feb-28 completes leap-day anniversaries
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

evaOS review status: completed

PR: #190 - V2 re-baseline batch: upstream delivery ports + D-ARCH-1/2/3 + how-long-ago fix (merge gated on the paired V2 run)
Head: a3a31dd14f4f13e5542821c10042e2524b2562e7
Updated: 2026-07-30T08:18:34.875Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #190

Review URL: #190 (review)

@100yenadmin

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@evaos-code-review-bot evaos-code-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

PR: #190 - V2 re-baseline batch: upstream delivery ports + D-ARCH-1/2/3 + how-long-ago fix (merge gated on the paired V2 run)
Head: a3a31dd14f4f13e5542821c10042e2524b2562e7 into main. Review event: COMMENT.
Provider: Unregistered provider id (builtin:zai-coding-plan, zcode (registry miss), model unknown).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
BATCH-REPORT.md added +414/-0 Documentation Elevated: large change
adaptive_retrieval.py modified +20/-2 Changed file Low
evidence_compiler.py modified +3/-1 Changed file Low
query_view_store.py modified +54/-6 Changed file Low
reasoning.py modified +275/-26 Changed file Elevated: large change
requirements_compiler.py modified +154/-53 Changed file Moderate: validated P2 finding
schemas.py modified +4/-1 Changed file Low
tests/test_adaptive_retrieval.py modified +160/-6 Test coverage Low
tests/test_chunk_vector_store.py modified +74/-0 Test coverage Low
tests/test_evidence_compiler.py modified +23/-0 Test coverage Low
tests/test_evidence_contract.py modified +372/-12 Test coverage Elevated: large change
tests/test_int8_two_stage_knn.py modified +8/-1 Test coverage Low
tests/test_lcm_recall.py modified +75/-0 Test coverage Low
tests/test_prescreen_flip_blackout.py modified +7/-0 Test coverage Low
tests/test_query_view_store.py modified +49/-0 Test coverage Low
tests/test_reasoning.py modified +297/-0 Test coverage Elevated: large change
tests/test_trajectory_composition_policies.py modified +29/-20 Test coverage Low
tests/test_trajectory_state_semantic_expansion.py modified +19/-8 Test coverage Low
tests/test_trajectory_store.py modified +232/-0 Test coverage Elevated: large change
tests/test_vector_store.py modified +196/-1 Test coverage Low
tools.py modified +21/-2 Changed file Low
trajectory_store.py modified +47/-6 Changed file Low
vector_store.py modified +139/-55 Changed file Low

Review Signal

Validated inline findings: 1 (P0: 0, P1: 0, P2: 1, P3: 0).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Runtime correctness: 1

Validation and Proof

No required validation recommendation selected; rely on existing GitHub checks and human review.
Proof status: not_applicable - No required behavior proof selected for this changed surface.
Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #184, #180, #166.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread requirements_compiler.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a3a31dd14f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread reasoning.py Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
reasoning.py (1)

123-159: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Centralize the occurrence-time labels.

  • reasoning.py still branches on raw strings (explicit, relative_to_session, relative_expression_without_session_date) that are duplicated in occurrence_time.py; if either side changes, trust metadata can quietly stay at not_applicable/None.
  • Use shared constants/Enum values for the source/reason labels, or raise on unknown event_time_source, so certification handling cannot drift.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@reasoning.py` around lines 123 - 159, Update the trust-classification logic
around the result handling in reasoning.py to reuse the shared occurrence-time
source and reason constants or Enum values defined by occurrence_time.py instead
of duplicating raw labels. Ensure unknown event_time_source values are rejected
rather than silently returning not_applicable/None, while preserving the
existing certification behavior for recognized explicit and relative-to-session
cases.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@BATCH-REPORT.md`:
- Around line 389-395: Update the Round-7 validation report to distinguish
results requiring the operator-local ci-stub from repository-replayable
local-gate evidence. Either add repository-contained provisioning instructions
or harness artifacts for the missing agent package, or explicitly label the
affected suite results as operator-local and non-replayable; preserve the
reported test outcomes.

In `@requirements_compiler.py`:
- Around line 1701-1733: Cache the regex set built from _unit_forms(unit),
actions, and contraction instead of rebuilding it inside _source_event_clause on
every call. Add an lru_cache-backed helper keyed by unit that returns the
compiled patterns, then make _source_event_clause reuse those patterns while
preserving the existing matching and return behavior.
- Around line 950-955: In the candidate date validation flow, reuse the
successfully parsed result from question_date_as_of_epoch or the corresponding
normalized day instead of calling date.fromisoformat on contract.question_as_of.
Preserve the None boundary behavior and compare event_day against the reused
parsed date without introducing a second strict parse.

---

Outside diff comments:
In `@reasoning.py`:
- Around line 123-159: Update the trust-classification logic around the result
handling in reasoning.py to reuse the shared occurrence-time source and reason
constants or Enum values defined by occurrence_time.py instead of duplicating
raw labels. Ensure unknown event_time_source values are rejected rather than
silently returning not_applicable/None, while preserving the existing
certification behavior for recognized explicit and relative-to-session cases.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 70e165d9-5c39-4667-b580-df3fa4def8ed

📥 Commits

Reviewing files that changed from the base of the PR and between cbdd4cc and a3a31dd.

📒 Files selected for processing (5)
  • BATCH-REPORT.md
  • reasoning.py
  • requirements_compiler.py
  • tests/test_evidence_contract.py
  • tests/test_reasoning.py
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: test (3.11)
  • GitHub Check: test (3.14)
  • GitHub Check: test (3.13)
  • GitHub Check: test (3.12)
🔇 Additional comments (5)
requirements_compiler.py (1)

1694-1741: Negation scoping and contraction handling verified against test coverage — LGTM.

Adjacency-bound negation (requiring no/none/zero/without to sit directly against the action/unit) correctly avoids the previously-flagged false positives ("Don", "Haven", "no luggage") while still rejecting the full contraction/negation set exercised in test_source_event_negation_binds_to_event_action_or_counted_unit.

tests/test_evidence_contract.py (2)

166-190: Open-cardinality uncertified-disclosure assertions now present — addresses prior feedback.

finite_coverage is False and "UNCERTIFIED" in result["context"] are now asserted, closing the gap flagged in the prior review round.


753-789: New negation and postdated-exclusion regression coverage looks correct.

Both the rejected/admitted negation phrase sets and the future-event exclusion scenario line up with the corresponding requirements_compiler.py logic.

Also applies to: 827-865

reasoning.py (1)

1383-1388: Leap-day anniversary clamping looks correct.

anniversary_day = min(earlier.day, calendar.monthrange(later.year, earlier.month)[1]) correctly clamps a Feb-29 anchor to Feb 28 in non-leap years, matching both parametrized cases in test_how_long_ago_years_clamps_leap_day_anniversary.

tests/test_reasoning.py (1)

304-330: New leap-day and malformed-sidecar regressions are well-targeted and match implementation.

Traced both against execute_plan's leap-day clamp and resolve_occurrence_time_with_trust's low-trust branch; results align with expectations.

Also applies to: 453-473

Comment thread BATCH-REPORT.md Resolved
Comment thread requirements_compiler.py Resolved
Comment thread requirements_compiler.py Resolved
100yenadmin added a commit that referenced this pull request Jul 30, 2026
@100yenadmin
100yenadmin merged commit 9d181aa into main Jul 30, 2026
7 checks passed
100yenadmin added a commit that referenced this pull request Jul 30, 2026
…51 banked; EINTR continuation + blind-adjudication record + instrument lessons
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant