Skip to content

Commit 79fee1d

Browse files
committed
GH-5520 NativeStore ValueStore WAL
1 parent fe9c6d5 commit 79fee1d

File tree

104 files changed

+12171
-427
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+12171
-427
lines changed

.github/workflows/pr-verify.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
- name: Build
6363
run: mvn --quiet clean && mvn -B --quiet -T 2C install -Pquick
6464
- name: Test
65-
run: mvn -B test -DskipITs -P-formatting -Dmaven.javadoc.skip -Djapicmp.skip -Denforcer.skip -Danimal.sniffer.skip
65+
run: mvn -B install -DskipITs -P-formatting -Dmaven.javadoc.skip -Djapicmp.skip -Denforcer.skip -Danimal.sniffer.skip
6666
- name: Publish Test Report
6767
if: failure()
6868
uses: scacap/action-surefire-report@v1.9.0
@@ -84,7 +84,7 @@ jobs:
8484
- name: Build
8585
run: mvn --quiet clean && mvn -B --quiet -T 2C install -Pquick
8686
- name: Verify
87-
run: mvn -B verify -PskipUnitTests,-formatting -Dmaven.javadoc.skip -Denforcer.skip -Danimal.sniffer.skip
87+
run: mvn -B install -PskipUnitTests,-formatting -Dmaven.javadoc.skip -Denforcer.skip -Danimal.sniffer.skip
8888
- name: Publish Test Report
8989
if: failure()
9090
uses: scacap/action-surefire-report@v1.9.0
@@ -105,7 +105,7 @@ jobs:
105105
- name: Build
106106
run: mvn --quiet clean && mvn -B --quiet -T 2C install -Pquick
107107
- name: Verify
108-
run: mvn -B verify -PslowTestsOnly,-skipSlowTests,-formatting -Dmaven.javadoc.skip -Djapicmp.skip -Denforcer.skip -Danimal.sniffer.skip
108+
run: mvn -B install -PslowTestsOnly,-skipSlowTests,-formatting -Dmaven.javadoc.skip -Djapicmp.skip -Denforcer.skip -Danimal.sniffer.skip
109109
- name: Publish Test Report
110110
if: failure()
111111
uses: scacap/action-surefire-report@v1.9.0

AGENTS.md

Lines changed: 95 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ Welcome, AI Agent! Your persistence, curiosity, and craftsmanship make a differe
44

55
You need to read the entire AGENTS.md file and follow all instructions exactly. Keep this fresh in your context as you work.
66

7-
> **Timebox:** Aim to complete each autonomous run in **15–30 minutes**.
8-
97
---
108

119
## Read‑Me‑Now: Proportional Test‑First Rule (Default)
@@ -27,63 +25,96 @@ It is illegal to `-am` when running tests!
2725
It is illegal to `-q` when running tests!
2826

2927
> **Clarification:** For **strictly behavior‑neutral refactors** that are already **fully exercised by existing tests**, or for **bugfixes with an existing failing test**, you may use **Routine B — Change without new tests**. In that case you must capture **pre‑change passing evidence** at the smallest scope that hits the code you’re about to edit, prove **Hit Proof**, then show **post‑change passing evidence** from the **same selection**.
30-
> **No exceptions for any behavior‑changing change** — for those, you must follow **Routine A — Full TDD**.
28+
> **No exceptions for any behavior‑changing change** — for those, you must follow **Routine A — Full TDD** or **Routine D — ExecPlans**.
3129
3230
---
3331

34-
## Three Routines: Choose Your Path
32+
## Four Routines: Choose Your Path
3533

3634
**Routine A — Full TDD (Default)**
3735
**Routine B — Change without new tests (Proportional, gated)**
3836
**Routine C — Spike/Investigate (No production changes)**
37+
**Routine D — ExecPlans: Complex features or significant refactors**
3938

4039
### Decision quickstart
4140

42-
1. **Is new externally observable behavior required?**
43-
**Yes:** **Routine A (Full TDD)**. Add the smallest failing test first.
41+
1. **Is ExecPlans required (complex feature, significant refactor or requested by the user)?**
42+
**Yes:** **Routine D (ExecPlans)**. Use an ExecPlan (as described in .agent/PLANS.md) from design to implementation.
4443
**No:** continue.
4544

46-
2. **Does a failing test already exist in this repo that pinpoints the issue?**
47-
**Yes:** **Routine B (Bugfix using existing failing test).**
48-
**No:** continue.
45+
2**Is new externally observable behavior required?**
46+
**Yes:** **Routine A (Full TDD)**. Add the smallest failing test first.
47+
**No:** continue.
4948

50-
3. **Is the edit strictly behavior‑neutral, local in scope, and clearly hit by existing tests?**
51-
**Yes:** **Routine B (Refactor/micro‑perf/documentation/build).**
52-
**No or unsure:** continue.
49+
3**Does a failing test already exist in this repo that pinpoints the issue?**
50+
**Yes:** **Routine B (Bugfix using existing failing test).**
51+
**No:** continue.
5352

54-
4. **Is this purely an investigation/design spike with no production code changes?**
55-
**Yes:** **Routine C (Spike/Investigate).**
56-
**No or unsure:** **Routine A.**
53+
4**Is the edit strictly behavior‑neutral, local in scope, and clearly hit by existing tests?**
54+
**Yes:** **Routine B (Refactor/micro‑perf/documentation/build).**
55+
**No or unsure:** continue.
56+
57+
5**Is this purely an investigation/design spike with no production code changes?**
58+
**Yes:** **Routine C (Spike/Investigate).**
59+
**No or unsure:** **Routine A.**
5760

5861
**When in doubt, choose Routine A (Full TDD).** Ambiguity is risk; tests are insurance.
5962

6063
---
6164

65+
## ExecPlans
66+
67+
When writing complex features or significant refactors, use an ExecPlan (as described in PLANS.md) from design to implementation.
68+
6269
## PIOSEE Decision Model (Adopted)
6370

64-
Use PIOSEE on every task to structure thinking and execution. It complements the routines below and ties directly into the Traceability trio (Description, Evidence, Plan).
71+
Use this as a compact, repeatable loop for anything from a one‑line bug fix to a multi‑quarter program.
72+
73+
### P — **Problem**
74+
75+
**Goal:** State the core problem and what “good” looks like.
76+
**Ask:** Who’s affected? What outcome is required? What happens if we do nothing?
77+
**Tip:** Include measurable target(s): error rate ↓, latency p95 ↓, revenue ↑, risk ↓.
78+
79+
### I — **Information**
80+
81+
**Goal:** Gather only the facts needed to move.
82+
**Ask:** What do logs/metrics/user feedback say? What constraints (security, compliance, budget, SLA/SLO)? What assumptions must we test?
83+
84+
### O — **Options**
85+
86+
**Goal:** Generate viable ways forward, including “do nothing.”
87+
**Ask:** What are 2–4 distinct approaches (patch, redesign, buy vs. build, defer)? What risks, costs, and second‑order effects?
88+
**Tip:** Check guardrails: reliability, security/privacy, accessibility, performance, operability, unit economics.
89+
90+
### S — **Select**
91+
92+
**Goal:** Decide deliberately and document why.
93+
**Ask:** Which option best meets the success criteria under constraints? Who is the decision owner? What’s the fallback/abort condition?
94+
**Tip:** Use lightweight scoring (e.g., Impact×Confidence÷Effort) to avoid bike‑shedding.
6595

66-
- Problem: restate the task in one sentence, note constraints/timebox, and identify likely routine (A/B/C).
67-
- Information: inspect modules and AGENTS.md, gather environment constraints, locate existing tests/reports, and search code to localize the work.
68-
- Options: list 2–3 viable approaches (routine choice, test scope, fix location) and weigh them with the Proportionality Model.
69-
- Select: choose one option and routine; update the Living Plan with exactly one `in_progress` step.
70-
- Execute: follow the Working Loop and house rules; for Routine A add the smallest failing test first; capture an Evidence block after each grouped action.
71-
- Evaluate: check against the Definition of Done; if gaps remain, adjust the plan or change routine; record final Evidence and a brief retrospective.
96+
### E — **Execute**
7297

73-
PIOSEE → Traceability trio mapping
74-
- P/I/O → Description
75-
- S → Plan (one `in_progress`)
76-
- E/E → Evidence and Verification
98+
**Goal:** Ship safely and visibly.
99+
**Ask:** What is the smallest safe slice? How do we de‑risk (feature flag, canary, dark launch, rollback)? Who owns what?
100+
**Checklist:** Traces/logs/alerts; security & privacy checks; docs & changelog; incident plan if relevant.
77101

78-
For documentation‑only edits and other Routine B cases, still run PIOSEE briefly to confirm neutrality and reversibility.
102+
### E — **Evaluate**
103+
104+
**Goal:** Verify outcomes and learn.
105+
**Ask:** Did metrics hit targets? Any regressions or side effects? What will we keep/change next loop?
106+
**Output:** Post‑release review (or retro), decision log entry, follow‑ups (tickets), debt captured.
107+
**Tip:** If outcomes miss, either **iterate** (new Options) or **reframe** (back to Problem).
108+
109+
---
79110

80111
### Benchmarking workflow (repository-wide)
81112

82113
The `scripts/run-single-benchmark.sh` helper is the supported path for spot-checking performance optimisations. It builds the chosen module with the `benchmarks` profile, constrains the benchmark selection to a single `@Benchmark` method, and when `--enable-jfr` is supplied it enforces repeatable profiling defaults (no warmup, ten 10-second measurements, one fork) while clearly reporting the destination of the generated JFR recording. Lean on this script whenever you need a reproducible measurement harness.
83114

84115
## Proportionality Model (Think before you test)
85116

86-
Score the change on these lenses. If any are **High**, prefer **Routine A**.
117+
Score the change on these lenses. If any are **High**, prefer **Routine A or D**.
87118

88119
- **Behavioral surface:** affects outputs, serialization, parsing, APIs, error text, timing/order?
89120
- **Blast radius:** number of modules/classes touched; public vs internal.
@@ -105,7 +136,7 @@ Score the change on these lenses. If any are **High**, prefer **Routine A**.
105136
* Relevant module tests pass; failures triaged or crisply explained.
106137
* Only necessary files changed; headers correct for new files.
107138
* Clear final summary: what changed, why, where, how verified, next steps.
108-
* **Evidence present:** failing test output (pre‑fix) and passing output (post‑fix) are shown for Routine A; for Routine B show **pre/post green** from the **same selection** plus **Hit Proof**.
139+
* **Evidence present:** failing test output (pre‑fix) and passing output (post‑fix) are shown for Routine A; for Routine B show **pre/post green** from the **same selection** plus **Hit Proof**; for Routine D NO EVIDENCE.
109140

110141
### No Monkey‑Patching or Band‑Aid Fixes (Non‑Negotiable)
111142

@@ -245,8 +276,8 @@ It is illegal to `-q` when running tests!
245276
The Maven reactor resolves inter-module dependencies from the configured local Maven repository (here: `.m2_repo`).
246277
Running `install` publishes your changed modules there so downstream modules and tests pick up the correct versions.
247278
248-
* Always run `mvn -o -Dmaven.repo.local=.m2_repo -Pquick install | tail -200` before you start working. This command typically takes up to 30 seconds. Never use a small timeout than 30,000 ms.
249-
* Always run `mvn -o -Dmaven.repo.local=.m2_repo -Pquick install | tail -200` before any `verify` or test runs.
279+
* Always run `mvn -o -Dmaven.repo.local=.m2_repo -Pquick clean install | tail -200` before you start working. This command typically takes up to 30 seconds. Never use a shorter timeout than 30,000 ms.
280+
* Always run `mvn -o -Dmaven.repo.local=.m2_repo -Pquick clean install | tail -200` before any `verify` or test runs.
250281
* If offline resolution fails due to a missing dependency or plugin, rerun the exact `install` command once without `-o`, then return offline.
251282
* Skipping this step can lead to stale or missing artifacts during tests, producing confusing compilation or linkage errors.
252283
* Always use a workspace-local Maven repository: append `-Dmaven.repo.local=.m2_repo` to all Maven commands (install, verify, formatter, etc.).
@@ -340,6 +371,14 @@ It is illegal to `-q` when running tests!
340371
341372
---
342373
374+
## Routine D — ExecPlans
375+
376+
> Use for **complex features or significant refactors**.
377+
378+
When writing complex features or significant refactors, use an ExecPlan (as described in .agent/PLANS.md) from design to implementation.
379+
380+
---
381+
343382
## Where to Draw the Line — A Short Debate
344383
345384
> **Purist:** “All changes must start with a failing test.”
@@ -353,7 +392,7 @@ It is illegal to `-q` when running tests!
353392
* Logging/message tweaks **not** asserted by tests.
354393
* Build/CI config that doesn’t alter runtime behavior.
355394
356-
**Out‑of‑scope (use Routine A)**
395+
**Out‑of‑scope (use Routine A/D)**
357396
* Changing query results, serialization, or parsing behavior.
358397
* Altering error messages that tests assert.
359398
* Anything touching concurrency, timeouts, IO, or ordering.
@@ -365,7 +404,7 @@ It is illegal to `-q` when running tests!
365404
## Working Loop
366405
367406
* **PIOSEE first:** restate Problem, gather Information, list Options; then Select, Execute, Evaluate.
368-
* **Plan:** small, verifiable steps; keep one `in_progress`.
407+
* **Plan:** small, verifiable steps; keep one `in_progress`, or follow PLANS.md (ExecPlans)
369408
* **Change:** minimal, surgical edits; keep style/structure consistent.
370409
* **Format:** `mvn -o -Dmaven.repo.local=.m2_repo -q -T 2C formatter:format impsort:sort xml-format:xml-format`
371410
* **Compile (fast):** `mvn -o -Dmaven.repo.local=.m2_repo -pl <module> -am -Pquick install | tail -500`
@@ -442,6 +481,11 @@ Assertions are executable claims about what must be true. Use **temporary tripwi
442481
* `mvn -o -Dmaven.repo.local=.m2_repo -q -T 2C formatter:format impsort:sort xml-format:xml-format`
443482
* Style: no wildcard imports; 120‑char width; curly braces always; LF endings.
444483
484+
### Import hygiene (always)
485+
486+
* Add explicit imports for every dependency you use instead of sprinkling fully qualified names through the code.
487+
* When an import exists, reference the simple class name; repeating the package inline is noisy and easy to get wrong.
488+
445489
---
446490
447491
## Source File Headers
@@ -505,6 +549,23 @@ Do **not** modify existing headers’ years.
505549
* `sed -n '1,200p' path/to/File.java`
506550
* `sed -n '201,400p' path/to/File.java`
507551
552+
### Inspecting Git Changes Without Reverting
553+
554+
* Never run `git checkout -- <file>` or `git restore --worktree <file>` just to peek at history — those commands mutate the working tree, try to grab `.git/index.lock`, and often require escalated privileges in this environment. Prefer read-only inspection.
555+
* To compare your edits against the last commit, use `git diff -- path/to/File.java` (working tree) or `git diff --cached -- path/to/File.java` (staged changes). Add `HEAD` to diff against the committed baseline explicitly: `git diff HEAD -- path/to/File.java`.
556+
* To view a committed version without touching the working tree, stream it directly: `git show HEAD:path/to/File.java | sed -n '1,120p'`. Swap `HEAD` with any commit hash or ref (`HEAD~2`, `feature~3`, etc.) to inspect older revisions.
557+
* When you need a disposable copy of a historical file, write it to a temp file instead of checking it out:
558+
`tmp=$(mktemp /tmp/file.XXXXXX); git show <commit>:path/to/File.java > "$tmp"; ${EDITOR:-less} "$tmp"`. Remove the temp file when done.
559+
* `git log -n 5 -- path/to/File.java` and `git show <commit> --stat -- path/to/File.java` are also safe ways to understand how the file evolved — all without altering the repo state.
560+
* Need to compare against a specific commit (local or remote) instead of just `HEAD`? Use `git diff <commit> -- path/to/File.java` or `git diff origin/main -- path/to/File.java` to see exactly what changed relative to that reference while keeping the working tree untouched.
561+
* For a quick read-only side-by-side, rely on process substitution: `diff -u <(git show HEAD:path/to/File.java) <(cat path/to/File.java)` displays how your edits differ from the committed version without staging or resetting anything. `git difftool -y HEAD -- path/to/File.java` is another safe option if you prefer an external viewer.
562+
* To study an older revision in depth, first list the relevant commits with `git log --oneline --follow -- path/to/File.java`, then stream any revision to a temp file for offline inspection:
563+
`tmp=$(mktemp /tmp/rdf4j-file.XXXXXX)`
564+
`git show <commit>:path/to/File.java > "$tmp"`
565+
`${EDITOR:-less} "$tmp" && rm "$tmp"`
566+
This pattern never touches the tracked file and avoids locking `.git/index`.
567+
* Need a whole-directory snapshot for archaeology? `git archive <commit> path/to/dir | tar -x -C /tmp/readonly-snapshot` extracts a copy under `/tmp` that you can browse freely, then delete when finished.
568+
508569
---
509570
510571
## Autonomy Rules (Act > Ask)
@@ -534,6 +595,7 @@ Do **not** modify existing headers’ years.
534595
*Routine A:* failing output (pre‑fix) and passing output (post‑fix).
535596
*Routine B:* pre‑ and post‑green snippets from the **same selection** + **Hit Proof**.
536597
*Routine C:* artifacts from investigation (logs/notes/measurements) and proposed next steps.
598+
*Routine D:* NO EVIDENCE REQUIRED.
537599
* **Assumptions:** key assumptions and autonomous decisions.
538600
* **Limitations:** anything left or risky edge cases.
539601
* **Next steps:** optional follow‑ups.

0 commit comments

Comments
 (0)