Skip to content

[doc] AGENTS.md: add XQSuite-vs-Java test-selection rubric; remove stale Known Issues - #6483

Merged
line-o merged 1 commit into
eXist-db:developfrom
joewiz:doc/agents-test-selection-rubric
Jun 15, 2026
Merged

[doc] AGENTS.md: add XQSuite-vs-Java test-selection rubric; remove stale Known Issues#6483
line-o merged 1 commit into
eXist-db:developfrom
joewiz:doc/agents-test-selection-rubric

Conversation

@joewiz

@joewiz joewiz commented Jun 15, 2026

Copy link
Copy Markdown
Member

[This PR was co-authored with Claude Code. -Joe]

Summary

Two documentation-only changes to AGENTS.md:

  1. Adds a "Choosing XQSuite vs Java tests" subsection that standardizes when a new test for eXist core should be written in XQSuite versus Java.
  2. Removes the "Known Issues" section, whose three entries are all stale.

Why

AGENTS.md is the canonical, repo-rooted home for contributor conventions, so guidance placed here is visible to any session or contributor working in the repo. The rubric captures a recurring decision (XQSuite vs Java, and which Java vehicle) that otherwise gets re-derived case by case. The Known Issues section, meanwhile, had drifted out of date and was actively misleading.

The test-selection rubric

  • Default to XQSuite (%test: annotations) for XQuery-level behavior.
  • Reach for Java only when XQSuite structurally can't express or exercise the behavior: a pure-Java unit; a function needing a context XQSuite doesn't provide (above all an HTTP request/response context — request:/response:/session: throw XPDY0002 with no live request); behavior that is the HTTP/transport layer; or behavior depending on Java-level wiring (broker pool, locking, transactions, startup/config).
  • Within Java, use the lightest vehicle that exercises the real behavior (pure unit → mocked-request unit → full HTTP integration test).
  • Cites the request-module content-negotiation work ([feature] request module: Accept-header parsing and content negotiation #6477) as a concrete precedent.

Why the Known Issues section was removed

All three entries were verified against current develop and found stale:

Two of the three were never true, and the third is fixed, so the section is removed rather than left partially correct.

Notes

Documentation only — no code or test changes.

Adds a "Choosing XQSuite vs Java tests" subsection to the testing conventions:
default to XQSuite for XQuery-level behavior, and reach for Java only when XQSuite
structurally can't express or exercise the behavior (pure-Java units, request/
response/session context that needs a live HTTP request, the HTTP/transport layer
itself, or Java-level wiring such as broker pool / locking / transactions). Within
Java, use the lightest vehicle that exercises the real behavior. Cites the
request-module content-negotiation work (eXist-db#6477) as precedent.

AGENTS.md is the canonical, repo-rooted home for this guidance so it is visible to
sessions regardless of which repo they are rooted in.

Also removes the "Known Issues" section, whose three entries were all stale; two
were never true:
- groupby.collation "flaky" / ArrayIndexOutOfBoundsException: unsubstantiated. No
  issue, PR, commit, or CI evidence backs it; the test is deterministic and passes.
  Asserting an unbacked "known flake" risks agents dismissing real CI failures.
- fn:filter / issue eXist-db#3382: fixed. eXist-db#3382 is closed and fn:filter now raises XPTY0004
  when the predicate function does not return xs:boolean.
- fn:doc() file:// restriction: unsubstantiated. DocUtils already routed file:/URL
  paths through SourceFactory when this entry was added (2026-03-15), so fn:doc could
  load file: documents all along; the later eXist-db#6207 work only added security-gating, it
  did not lift a block that never existed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joewiz
joewiz requested a review from a team as a code owner June 15, 2026 06:30
@line-o
line-o requested a review from a team June 15, 2026 10:16
@line-o
line-o merged commit 8ecd2a8 into eXist-db:develop Jun 15, 2026
9 checks passed
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.

3 participants