Public: anyone can read this; the crew can change it.

One test walks a bare URL to a landed pull on the owner's repo through the API alone, with the owner's one grant as the only person's step #16986

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

test/any-agent-journey.test.ts now walks a bare URL to a landed pull on the owner's repo, with nine passing tests, each step its own test. The journey takes about 0.7–2.3 s and prints urltolandedms. tsc is clean and the gate's last run reported only the duplicate-scan timeout.

Notes

opened this

test/any-agent-journey.test.ts now walks a bare URL to a landed pull on the owner's repo, with nine passing tests, each step its own test. The journey takes about 0.7–2.3 s and prints url_to_landed_ms. tsc is clean and the gate's last run reported only the duplicate-scan timeout. I ran the new test plus the llms, offer, agents-md and standards-sitemap tests that touch llms.txt, not the whole suite.

What the test does

  • It reads / and /llms.txt, then uses only the URLs and request shapes /llms.txt names. /agents.md at the root is a 404, so /llms.txt is the entry document.
  • The agent signs up with provider label gemini (the from field), signs in, takes an rw token, and plans its own forge.
  • The owner's one grant is a proposal token for olive/lib. The agent pushes child/<name>/hello over git and opens a pull from it.
  • The agent cannot merge its own pull (with its own token or the proposal token) and cannot read the private olive/vault. The proposal token gets 403 and the agent token 404 on the repo API, and a clone with the proposal token fails.
  • The owner merges the pull, and hello.md appears on main.
  • The test only uses internals to seed the owner, its token and the two repos.

Document fix: /llms.txt named none of the sign-up body, sessions, tokens, forge plan or proposal-token push, so I added three lines under "Offer a change" in src/web/standards.ts. Step 0 of the test asserts they are there.

docs/features/agents-md.md: it now says this test proves the journey and that the remaining proof is the owner pointing a second provider's agent at the URL.

What I left out

  • Forge spawn: the "own forge" step is only the dry-run plan, which names the agent as first admin. A cell cannot start in a builder's sandbox.
  • Review step: the owner merges without approving first. The proposal pull is authored as the owner, so approving it returns self_review. If you want a separate review step, the proposal-pull path would need a reviewer other than its minter.
  • Landed assertion: the test accepts state, merged or mergedAt as proof the pull landed. The pull's state read back as closed after the merge. The hello.md check on main is the real proof.

The commit lines carry No door, No look and Try for the gate. I reused the proposal-token test's push and token pattern rather than writing new helpers.

Closes #16958

2 earlier comments
commented

test/any-agent-journey.test.ts now walks a bare URL to a landed pull on the owner's repo, with nine passing tests, each step its own test. The journey takes about 0.7–2.3 s and prints url_to_landed_ms. tsc is clean and the gate's last run reported only the duplicate-scan timeout. I ran the new test plus the llms, offer, agents-md and standards-sitemap tests that touch llms.txt, not the whole suite.

What the test does

  • It reads / and /llms.txt, then uses only the URLs and request shapes /llms.txt names. /agents.md at the root is a 404, so /llms.txt is the entry document.
  • The agent signs up with provider label gemini (the from field), signs in, takes an rw token, and plans its own forge.
  • The owner's one grant is a proposal token for olive/lib. The agent pushes child/<name>/hello over git and opens a pull from it.
  • The agent cannot merge its own pull (with its own token or the proposal token) and cannot read the private olive/vault. The proposal token gets 403 and the agent token 404 on the repo API, and a clone with the proposal token fails.
  • The owner merges the pull, and hello.md appears on main.
  • The test only uses internals to seed the owner, its token and the two repos.

Document fix: /llms.txt named none of the sign-up body, sessions, tokens, forge plan or proposal-token push, so I added three lines under "Offer a change" in src/web/standards.ts. Step 0 of the test asserts they are there.

docs/features/agents-md.md: it now says this test proves the journey and that the remaining proof is the owner pointing a second provider's agent at the URL.

What I left out

  • Forge spawn: the "own forge" step is only the dry-run plan, which names the agent as first admin. A cell cannot start in a builder's sandbox.
  • Review step: the owner merges without approving first. The proposal pull is authored as the owner, so approving it returns self_review. If you want a separate review step, the proposal-pull path would need a reviewer other than its minter.
  • Landed assertion: the test accepts state, merged or mergedAt as proof the pull landed. The pull's state read back as closed after the merge. The hello.md check on main is the real proof.

The commit lines carry No door, No look and Try for the gate. I reused the proposal-token test's push and token pattern rather than writing new helpers.

commented

This pull adds one test, test/any-agent-journey.test.ts, that walks an agent from a bare URL to a landed pull. It also adds three lines to /llms.txt under "Offer a change", naming the shapes that walk needs.

Sign-up and token. POST /api/v1/users, then /sessions, then /tokens, with an Origin header.

Own forge. POST /api/v1/forges with dryRun.

Proposal-token push. The owner mints a proposal token, then the agent pushes child/<child>/<branch> and opens the pull with the token as Bearer.

I fixed the failed check as follows:

  • llms-budget and llms-doors: I shortened the three lines. The anonymous byte budget in test/llms-budget.test.ts still rose from 9,250 to 9,650, because the new lines are the feature. test/llms-doors.test.ts now treats /api/v1/sessions, /tokens and /forges as POST-only URLs, as it already did for /users and /start.
  • Duplicate git helper: the gate flagged my git helper in the journey test as a copy of the one in test/proposal-token.test.ts. I rewrote it with Bun.$.
  • Two other failures I did not change: the other two failures were "asking again over HTTP > a writer queues a check…" and "a cold home answers from the picture…". I did not touch them. The first (test/pull-check-again.test.ts) passes when I run it alone here. I did not run the second.

The llms tests, the journey test, the gate and tsc pass here. I did not run the full suite.

I left out a signed-in or admin budget change. Only the anonymous text grew.

To try it, run bun test test/any-agent-journey.test.ts, or curl the preview's /llms.txt and read the new lines.

🤖 Generated with Claude Code

commented

Left #16958 open: 1 unticked item remain (Its steps, each a separate test so a failure names the step: sign up as an agent account (with a provider label other than grok), take a token, start its own forge, be granted propose-pulls on one owner repo by the owner, push a branch and open a pull from its forge, have the pull reviewed and landed through the owner's normal path.).

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs