Skip to content

Commit the LDI local-decision architecture contract and expand the source inventory (SLM-114) - #331

Merged
Tyler-R-Kendrick merged 2 commits into
mainfrom
claude/slm-114-ldi-architecture
Jul 18, 2026
Merged

Commit the LDI local-decision architecture contract and expand the source inventory (SLM-114)#331
Tyler-R-Kendrick merged 2 commits into
mainfrom
claude/slm-114-ldi-architecture

Conversation

@Tyler-R-Kendrick

@Tyler-R-Kendrick Tyler-R-Kendrick commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

LDI0-01 (SLM-114). Makes the local-decision-intervention (LDI) research synthesis and architectural boundaries canonical in the repository so future agents cannot recreate a parallel harness, repeat the falsified E249-E284 chain, or treat a local-metric gain as promotion evidence. Documentation / research-inventory / test contract only — no code, model, checkpoint, adapter, or model-card quality change.

Changes

  • docs/design/local-decision-interventions.md — new Architecture contract (LDI0-01): evidence / objective / actuator / experiment / promotion separated into distinct named owners (local_decisions.py, trace_store.py, local_train.py, the quality matrix, ship gates + model card), six invariants, an explicit "do not create a second orchestration/training stack" rule, and DecisionEventV2 as the next evidence contract. Added a Measured chain and current blocker section — the E248-E286 chain is negative and the current blocker is stated: stable state support does not imply objective/action-partition support.
  • src/slm_training/resources/autoresearch/local-decision-sources.json — added 9 arXiv works (33→42 rows, 25→34 papers), each with metadata verified against arXiv on 2026-07-17: MGDA, Gradient Surgery/PCGrad, LoRA, PICARD, AdaLoRA, DeepSeekMath/GRPO, Grammar-Aligned Decoding/ASAp, min-p, TAB-PO. Unique source_ids and canonical URIs; no paper duplicated under an alternate URL.
  • docs/design/research-lineage.md — extended the existing Exact-state local decision preference entry with the new sources using the repo's real Faithful / Adapted / Surrogate / Adjacent vocabulary (not duplicating LoRA/PICARD/GAD/GRPO entries that already exist).
  • docs/design/quality-experiment-matrix.md — added the LDI campaign index: a namespace pointer that claims no unrun row and mints no E ID, records the negative measured chain, and codifies the E-ID allocation rule (highest allocated = E291; next free ≥ E292).
  • tests/test_autoresearch/test_harness.py — updated and extended test_local_decision_source_manifest_is_complete to the new counts plus source-ID uniqueness, required-metadata presence, unique canonical URIs, implementation-status vocabulary, and the nine additions.
  • docs/design/iter-ldi0-01-source-expansion-20260717.md — evidence memo (reviewed base commit c7cb099, before/after counts, duplicate/alternate-URL handling, classification table, honesty boundary).

Acceptance criteria

  • local-decision-sources.json validates under _load_sources with no duplicate papers under alternate URLs (42 rows, unique ids + URIs).
  • local-decision-interventions.md distinguishes current implementation, measured evidence, proposed work, and the falsified chain.
  • research-lineage.md maps each new derivative to a paper and labels it honestly.
  • quality-experiment-matrix.md has an LDI namespace/index with no unrun-row claim and no conflicting E ID.
  • Architecture text names the existing owners and forbids a second stack.
  • Links use stable arXiv/repo URLs; title/authors/date metadata checked against arXiv.
  • A focused test validates source IDs, required metadata, unique canonical URIs, and implementation-status vocabulary.
  • ruff and the focused docs/source tests pass.

Verification

Run against a Python 3.12 .venv (.[dev]):

  • pytest tests/test_autoresearch -q51 passed
  • .githooks/check-changed → selects test_autoresearch/test_harness.py; ruff + py_compile + pytest → 43 passed
  • python -m scripts.repo_policy → ok · git diff --check → clean · all repository-relative links in the four changed docs resolve

Honesty boundary

Specification / inventory only. No experiment, train, eval, benchmark, checkpoint, adapter, or model-card quality update; no paper result is represented as a repository result; constraint shadows certify decoder legality only, never a semantic preference label. No ship gate is weakened and no readiness or promotion claim is made.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KVT9Qe5YUhgZqvaHLCAYSS


Generated by Claude Code

Summary by CodeRabbit

  • Documentation

    • Formalized the LDI0-01 local-decision architecture contract and clarified its boundaries, measured outcomes, and current blocker.
    • Expanded research lineage and source-audit documentation with nine additional academic sources and updated provenance details.
    • Added an LDI campaign index and clarified experiment ID allocation and measured campaign references.
  • Tests

    • Strengthened source-manifest validation for completeness, uniqueness, metadata, canonical identifiers, and supported implementation classifications.

…entory (SLM-114)

Make the local-decision-intervention (LDI) research synthesis and architectural
boundaries canonical so future agents cannot recreate a parallel harness, repeat the
falsified E249-E284 chain, or treat a local-metric gain as promotion evidence.

- local-decision-interventions.md: add the LDI0-01 architecture contract
  (evidence/objective/actuator/experiment/promotion separation with named owners,
  six invariants, forbids a second stack, DecisionEventV2 as the next contract) and a
  measured-chain / current-blocker summary (blocker: stable state support does not
  imply objective/action-partition support)
- local-decision-sources.json: add 9 arXiv works (MGDA, PCGrad, LoRA, PICARD,
  AdaLoRA, DeepSeekMath/GRPO, GAD/ASAp, min-p, TAB-PO) with metadata verified against
  arXiv; 33->42 rows, 25->34 papers, unique ids/URIs
- research-lineage.md: extend the exact-state local-decision entry with the new
  sources under the existing Faithful/Adapted/Surrogate/Adjacent vocabulary
- quality-experiment-matrix.md: add the LDI campaign index (namespace pointer; claims
  no unrun row, mints no E ID, records next-free >= E292)
- test_harness.py: update+extend the manifest test (counts, source-id uniqueness,
  required metadata, unique canonical URIs, implementation-status vocabulary)
- add iter-ldi0-01-source-expansion-20260717.md evidence memo

Documentation/inventory only: no code, model, checkpoint, adapter, or model-card
quality change; no ship gate weakened.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KVT9Qe5YUhgZqvaHLCAYSS
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
slm-training Ready Ready Preview, Comment Jul 17, 2026 11:28pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Tyler-R-Kendrick, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a997801e-9d1a-43c7-85ff-7056be654b03

📥 Commits

Reviewing files that changed from the base of the PR and between 86fec0b and ec53e17.

📒 Files selected for processing (1)
  • tests/test_autoresearch/test_harness.py
📝 Walkthrough

Walkthrough

The change formalizes the LDI0-01 architecture contract, expands the local-decision source inventory, strengthens manifest validation, and updates experiment-matrix and research-lineage records with measured-chain and provenance details.

Changes

LDI0-01 contract and measured boundary

Layer / File(s) Summary
Architecture contract and measured chain
docs/design/local-decision-interventions.md, docs/design/iter-ldi0-01-source-expansion-20260717.md
Defines LDI0-01 ownership boundaries, DecisionEventV2, source and E-ID invariants, measured outcomes, and the current blocker.
Source expansion specification
docs/design/iter-ldi0-01-source-expansion-20260717.md
Records the source-count changes, canonical URL rules, nine-work classification, and specification-only boundary.

Manifest expansion and validation

Layer / File(s) Summary
Expanded source manifest
src/slm_training/resources/autoresearch/local-decision-sources.json
Adds academic source records and updates the manifest scope to 34 academic works and 8 implementation/documentation sources.
Manifest completeness checks
tests/test_autoresearch/test_harness.py
Validates row counts, unique identifiers, required metadata, allowed implementation statuses, and inclusion of the nine new arXiv identifiers.

Research and campaign alignment

Layer / File(s) Summary
Campaign index and audit framing
docs/design/quality-experiment-matrix.md
Adds the LDI campaign index, records measured experiment ranges, and updates source-audit and E-ID allocation statements.
Research lineage updates
docs/design/research-lineage.md
Expands cited papers, records measured V10 and ledger results, and distinguishes legality constraints from semantic preference claims.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the two main changes: the LDI architecture contract and the expanded source inventory.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/slm-114-ldi-architecture

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@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: 2

🤖 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 `@tests/test_autoresearch/test_harness.py`:
- Line 745: Update the allowed_status set in the test harness to exactly match
the canonical architecture vocabulary: Faithful, Adapted, Surrogate, and
Adjacent. Remove Direct and Rejected while preserving the existing validation
flow that consumes allowed_status.
- Around line 753-754: Update the manifest read in the test harness to call
Path.read_text with an explicit UTF-8 encoding, matching _load_sources and
avoiding dependence on the host locale.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 873a59da-5b7c-4ff0-8ac0-416c0fb30680

📥 Commits

Reviewing files that changed from the base of the PR and between c7cb099 and 86fec0b.

📒 Files selected for processing (6)
  • docs/design/iter-ldi0-01-source-expansion-20260717.md
  • docs/design/local-decision-interventions.md
  • docs/design/quality-experiment-matrix.md
  • docs/design/research-lineage.md
  • src/slm_training/resources/autoresearch/local-decision-sources.json
  • tests/test_autoresearch/test_harness.py

Comment thread tests/test_autoresearch/test_harness.py Outdated
Comment thread tests/test_autoresearch/test_harness.py Outdated
…manifest UTF-8 (SLM-114)

- allowed_status now matches the repo's canonical research-lineage vocabulary
  (Faithful/Adapted/Surrogate/Adjacent) rather than the issue text's Direct/Rejected;
  the manifest values {Adapted, Adjacent} remain a subset, so the check is unchanged.
- read the manifest with explicit encoding="utf-8" to match _load_sources and avoid
  host-locale dependence (author names contain non-ASCII characters).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KVT9Qe5YUhgZqvaHLCAYSS
@Tyler-R-Kendrick
Tyler-R-Kendrick merged commit 09ea50b into main Jul 18, 2026
4 checks passed
@Tyler-R-Kendrick
Tyler-R-Kendrick deleted the claude/slm-114-ldi-architecture branch July 18, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants