Skip to content

Add the lane record writer that refuses any command the run did not log #15734

Description

@kyle-sexton

Parent

Refs #15703
Source: PLAN Phase 11, topic ecosystem-specifics

Depends on

Outcome

A lane's proposed ecosystem record contains only commands taken from that run's assumed: lines; any other command makes the writer exit non-zero and write nothing. A consumer can run the same check in its own CI.

Demo: feed the writer three assumed: lines and get a record with exactly those three values; add a fourth command that is not in the lines and the writer exits non-zero and writes nothing.

This item bounds what a lane may record; its review gate is the security review, run at the frontier tier.

What is built:

  • One script in the toolchain check skill, with two modes.
    • Write mode reads that run's assumed: <ecosystem>.<key>=<value> (<file:line>) lines, re-reads each cited line, and writes the proposed record to a path the caller names outside the consumer's ecosystem records folder, so the same run never reads its own draft as a record and the unattended no-write rule holds.
    • Verify mode takes a record file and the lines and exits non-zero on any value the lines do not support.
  • /toolchain:check runs write mode only under an explicit flag.
  • The skill text tells the unattended session what to do with the draft: put it in the run report, and open a separate pull request that adds it to the ecosystem records folder through /source-control:pull-request create when that skill is installed. The script neither commits nor pushes. No lane workflow file changes.
  • The skill section cites the acceptance sentence ("a merged pull request counts as acceptance", ecosystem records only).

Method:

  • Tests first: three assumed: lines yield exactly those three values; a fourth command not in the lines exits non-zero and writes nothing; a malformed line is refused and named; a line whose cited file:line does not hold that manifest script, task-runner target or build entry point is refused; an install verb or a CI workflow file as the source is refused; the output validates against the ecosystem-commands schema.
  • The skill-text change runs the toolchain check cases as a two-version compare.
  • Run budget: 120 runs (8 toolchain check cases plus 2 new, on the opus and sonnet aliases, three runs per side). Select cases with --case, use --runs 3 and a --max-cost-usd ceiling, and start no batch after a usage-limit error.
  • Eval batches run in the one local eval-runner session in the main checkout. Open the pull request with the do-not-merge label; the compare record releases it.

Decisions

  • D5 (interview Q18, Q30): a lane's record pull request holds only stated or inferred commands, checked mechanically.
  • Design Q40: one script is both the writer and the check; a model-written record could hold a command the run never executed.
  • D8: the writer checks each value against its cited line, writes outside the records folder, has a verify mode, and the skill text (not a lane workflow) tells the session to open the record pull request (approved by the owner with the plan).
  • Constraint: "a merged pull request counts as acceptance" applies to ecosystem records only.

Key interfaces

  • Lane record input: lines of the form assumed: <ecosystem>.<key>=<value> (<file:line>), produced by an unattended run. The record's own format is the existing ecosystem-commands schema.
  • The writer's command line: reads assumed: lines on standard input, writes one record file, exit code.
  • "One script, run by /toolchain:check under an explicit flag, builds a lane's proposed record only from that run's assumed: lines and refuses any other command; it is both the writer and the check."
  • Two-way door: the lane record script.

Done when

  • AC6: a lane's record pull request containing a command outside the unattended limits is refused by a deterministic check (the writer's refusal case exits non-zero).
  • The script's test file passes, including every refusal case.
  • The check skill's text names the assumed: input and the separate pull request.
  • The security review gate passed; the compare record and this repository's dogfooding step are in the pull request body.
  • AC7: nothing is cut here, so no control result is owed.
  • AC10: no new enforcement-placing skill is added here.

Out of scope

  • Any lane workflow file.
  • Committing or pushing from the script.

Activity

  1. added
    area: security
    agent-ready
    on Nov 12, 2026
  2. github-actions commented on Nov 13, 2026

    @github-actions
    Contributor

    Size: Small
    Complexity: Medium
    Uncertainty: Knowable
    Flags: intent
    Blocked by: none
    Blast radius: the toolchain check skill's lane-record script, its tests and skill text, and the eval cases; read by unattended /toolchain:check runs and consumer CI.
    Reversible: yes; revert the script and skill-text changes (two-way door per the issue).
    Claims checked:

    1. A writer and verify script exists in the check skill: held, plugins/toolchain/skills/check/scripts/lane-record.mjs (write and verify modes are invoked at plugins/toolchain/skills/check/SKILL.md:191 and :201).
    2. /toolchain:check runs write mode only under an explicit flag: held, --propose-records <dir> at plugins/toolchain/skills/check/SKILL.md:5 and :36.
    3. The test file covers the refusal cases (fourth command, malformed line, install verb, CI workflow source, schema validation): held, plugins/toolchain/skills/check/scripts/lane-record.test.mjs:116-260.
    4. The skill text names the assumed: input and the separate pull request: partly held. The assumed: input and the section 5 draft step are there (SKILL.md:184-186); I did not confirm the separate-pull-request wording or the "merged pull request counts as acceptance" citation.
    5. The recorded decision says the whole issue remains because PR fix(intake): count a lanes App close with the lane's outcome marker as a resolved blocker #18987 delivered nothing: not held for the current tree. fix(intake): count a lanes App close with the lane's outcome marker as a resolved blocker #18987 predates the code above, and the later pull request feat(toolchain): add the lane record writer that refuses any command the run did not log #19046 merged with Refs:. I could not see feat(toolchain): add the lane record writer that refuses any command the run did not log #19046's contents, because it is not in the merged-pulls list I was given.
      Open questions:
    6. Given the writer, verify mode, flag and tests are already in the tree, is what remains only the done-when items that are not code: the security review gate, the two-version compare record and the dogfooding step in a pull request body? Or is any code change still owed?
      RECOMMENDED: the remainder is the security review gate, the compare record and the dogfooding step only; close the issue once they are recorded. Basis: lane-record.mjs, its tests and the --propose-records flag exist in the checkout, and the earlier recorded decision about fix(intake): count a lanes App close with the lane's outcome marker as a resolved blocker #18987 predates them.
      To answer, post a comment that starts with this line:
    **Decision recorded.** <answer>
    

    Automated triage. A maintainer reviews it.

  3. added
    needs-triage
    on Nov 13, 2026
  4. melodic-automation-lanes commented on Nov 13, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: merged pull request #18987 names it with Refs: after its newest decision or refinement comment, so its work may already be done: close the issue if it is, or post a comment whose first line is **Decision recorded.** saying what is left, which sends it back through intake. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  5. 55 remaining items

  6. melodic-automation-lanes commented on Nov 25, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"54c8e076889a474f44d4a5c6c6020d1c80a5fb86ca3cdf76165151edd1bd207a","body_sha256":"e32904c5fcd17fd6f77be90cb071cb6c53169cb9f1841793481c35bc66931cec"}

  7. removed
    needs-triage
    on Nov 25, 2026
  8. github-actions commented on Nov 25, 2026

    @github-actions
    Contributor
    No description provided.
  9. melodic-automation-lanes commented on Nov 25, 2026

    @melodic-automation-lanes
    Contributor

    Pull request #19046 merged with Refs:, so this issue stays open and nothing starts the lane on it again. work-unblock removed status: ready and agent-ready, so the hourly triage sweep sends it back to intake triage. Admission then parks it at status: confirmed for a check of what that pull request left, until a **Decision recorded.** comment says what is left or someone closes it.

  10. added
    needs-owner-decision
    needs-triage
    on Nov 25, 2026
  11. melodic-automation-lanes commented on Nov 25, 2026

    @melodic-automation-lanes
    Contributor

    The triage verdict left this issue at needs-owner-decision:

    • flagged: intent
    • held by needs-owner-decision
    • no lanes App verdict comment shows whether an earlier verdict was flagged

    Reason: intent

  12. melodic-automation-lanes commented on Nov 25, 2026

    @melodic-automation-lanes
    Contributor

    Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.

    Intended outcome: The writer, verify mode, flag, tests and skill text already exist in the tree via PR #​19046; what likely remains is recording the security review gate, the two-version compare and the dogfooding step, then closing.

    Related work

    Open questions

    1. The owner decision says the whole issue remains because PR #​18987 delivered nothing, but PR #​19046 landed afterward and the writer, verify mode, flag, tests and skill text are now in the tree. Is any code still owed, or only the security review gate, the two-version compare record and the dogfooding step?
      RECOMMENDED: Treat the code as delivered by #​19046; owe only the security review gate, the compare record and the dogfooding step, then close. Basis: plugins/toolchain/skills/check/SKILL.md:184-201
    2. Can an unattended run perform the remaining items (frontier-tier security review, 120-run eval compare in the local eval-runner session, dogfooding)?
      RECOMMENDED: No; treat them as checks a person runs, and have a lane only verify the code and tests against the other done-when items. Basis: judgment
    3. Does the existing skill text satisfy the done-when item naming the assumed: input, the separate pull request and the 'merged pull request counts as acceptance' citation?
      RECOMMENDED: Yes; section 5 names all three, so no skill-text change is owed. Basis: plugins/toolchain/skills/check/SKILL.md:186-196

    Sources read

    • plugins/toolchain/skills/check/SKILL.md:5: argument-hint includes --propose-records <dir>
    • plugins/toolchain/skills/check/SKILL.md:184-201: section 5 describes write mode, the assumed: input, the separate PR, the acceptance citation and verify mode
    • plugins/toolchain/skills/check/scripts/lane-record.mjs:18: ASSUMED_LINE regex; refusal paths for malformed lines and unlogged commands at lines 106-123 and 558
    • plugins/toolchain/skills/check/scripts/lane-record.test.mjs: test file for the writer exists

    To answer, post a comment that starts with this line:

    **Decision recorded.** <answer>
    

    Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: securityneeds-owner-decisionneeds-triage

    Fields

    Work status

    needs-owner-decision

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions