Skip to content

autonomy: lane-stop-gate arm record TTL (7 days) vs the 30-day /loop limit (held for the owner, security) #17834

Description

@kyle-sexton

Refs: #17713

Context

Item 8 of the 13 handoffs the v2.1.330 changelog apply run filed as #17713, split one issue per item under the owner's decision on that issue ("Go with recommendations.", 2026-11-21).

Route: a security-tagged decision item, held for the owner (owner decision on #17713).

Owner surface: plugins/autonomy/hooks/lane-stop-gate.sh
Lens: correct
Items: 2.1.330-102
Range: 2.1.330..2.1.330

Required sentence: Component keeps the lane arm record for 7 days and says it lives for the claiming session (false once a standing lane's /loop can run 30 days: a lane past day 7 loses its arm record and later Stop events go unguarded); the release says /loop now runs up to 30 days (true).

Why a handoff (security): Condition 5: the hook guards Stop on unattended lanes and the arm id is a capability pointer. The link between the 7-day TTL and the /loop limit is inferred, not stated in the code. Also conditions 2 and 3 (docs still say 7 days; verification light).

Repo evidence (unverified, verification: skipped (light)): lane-stop-gate.sh:277 GATE_ARM_TTL_SECONDS; lane-stop-gate-arm.sh:132 (-mtime +7); plugins/autonomy/README.md:175-177; hooks/lane-stop-gate.test.sh
Recheck trigger: scheduled-tasks page #seven-day-expiry

Done when

  • The owner decides whether GATE_ARM_TTL_SECONDS (plugins/autonomy/hooks/lane-stop-gate.sh:277) and the -mtime +7 sweep (lane-stop-gate-arm.sh:132) change to cover a /loop that runs up to 30 days

Activity

  1. added
    needs-owner-decision
    on Nov 21, 2026
  2. added
    needs-triage
    on Nov 21, 2026
  3. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none
    Blast radius: the autonomy plugin's lane-stop-gate hook, arm script, README and hook test; anyone running unattended lanes with the Stop gate.
    Reversible: yes; revert the change to restore the 7-day lifetime.
    Open questions: none

    Decision recorded. Raise the arm record lifetime to 31 days, from one shared constant (owner, 2026-11-22, in the GitHub Work session: "31 days, one constant"). Row: owner-decisions.md L321, added in https://github.com/melodic-software/architecture/pull/168.

    Basis:

    • plugins/autonomy/hooks/lane-stop-gate.sh:49-51: the record "lives for the claiming session's whole life (every /loop cycle's stop stays gated)". A 7-day TTL (:277) and the -mtime +7 sweep (lane-stop-gate-arm.sh:132) break that once a /loop runs up to 30 days on Claude Code 2.1.330 (main's docs, docs: state the 30-day loop expiry from Claude Code 2.1.330 #17935).
    • Past day 7 the gate drops the record and later Stop events pass unguarded, so the longer lifetime keeps the guard on; it loosens nothing.
    • One constant: two hand-kept copies of the same age already exist and can drift.

    Done when:

    • plugins/autonomy/hooks/lane-stop-gate-lib.sh defines the arm record lifetime once, in days, set to 31
    • GATE_ARM_TTL_SECONDS in plugins/autonomy/hooks/lane-stop-gate.sh is derived from that constant
    • The find -mtime sweep in plugins/autonomy/hooks/lane-stop-gate-arm.sh uses that constant
    • plugins/autonomy/README.md and the hook header comments state 31 days
    • plugins/autonomy/hooks/lane-stop-gate.test.sh covers a record aged 8 days (still armed) and one aged 32 days (expired), and passes

    #17834 (comment)

    This decision settles the open questions (lifetime, shared constant, and the longer-lived record). Related: #17833 and #16967.

    Automated triage. A maintainer reviews it.

  4. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: the issue is at status: ready.

  5. melodic-automation-lanes commented on Nov 21, 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: Raise the arm record lifetime (GATE_ARM_TTL_SECONDS and the -mtime +7 sweep) to cover a 30-day /loop, with the README, header comments and TTL test updated to match, if the owner agrees.

    Related work

    Open questions

    1. Should the arm record TTL be raised to cover a 30-day /loop, or stay at 7 days with the docs corrected to say a lane past day 7 loses its guard?
      RECOMMENDED: Raise both to at least 31 days, so a lane running the full 30 days keeps its arm record and Stop stays guarded. Basis: plugins/autonomy/hooks/lane-stop-gate.sh:277
    2. Should the lifetime be one shared constant used by both the hook TTL check and the arm script find sweep, so the two cannot drift apart?
      RECOMMENDED: Yes: define the days value once in lane-stop-gate-lib.sh and derive the seconds value and the -mtime argument from it. Basis: plugins/autonomy/hooks/lane-stop-gate-arm.sh:132
    3. Is a longer-lived arm record acceptable for the capability-pointer risk, given a crashed lane's record would linger about 31 days rather than 7?
      RECOMMENDED: Yes. The record is bound to its claiming session and the relaunch sweep still retires stale ones, so the added exposure is small next to leaving a long lane unguarded. Basis: plugins/autonomy/hooks/lane-stop-gate.sh:49

    Sources read

    • context.json: no comment starting 'Decision recorded.' exists on #​17834, so the owner decision is still open.
    • plugins/autonomy/hooks/lane-stop-gate.sh:277: GATE_ARM_TTL_SECONDS=$((7 * 86400))
    • plugins/autonomy/hooks/lane-stop-gate.sh:380: record is expired when now - armed_at exceeds GATE_ARM_TTL_SECONDS
    • plugins/autonomy/hooks/lane-stop-gate-arm.sh:132: find "$DIR" -type f -mtime +7 -delete sweeps records older than 7 days
    • plugins/autonomy/README.md:175: says the record expires after 7 days and lives for the claiming session
    • plugins/autonomy/hooks/lane-stop-gate.sh:49: header comment says the record lives for the claiming session and is TTL-bounded
    • plugins/autonomy/hooks/lane-stop-gate.test.sh:546: test asserts an expired arm record does not engage the gate

    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.**.

  6. removed
    needs-owner-decision
    on Nov 22, 2026
  7. kyle-sexton commented on Nov 22, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded. Raise the arm record lifetime to 31 days, from one shared constant (owner, 2026-11-22, in the GitHub Work session: "31 days, one constant"). Row: owner-decisions.md L321, added in https://github.com/melodic-software/architecture/pull/168.

    Basis:

    • plugins/autonomy/hooks/lane-stop-gate.sh:49-51: the record "lives for the claiming session's whole life (every /loop cycle's stop stays gated)". A 7-day TTL (:277) and the -mtime +7 sweep (lane-stop-gate-arm.sh:132) break that once a /loop runs up to 30 days on Claude Code 2.1.330 (main's docs, docs: state the 30-day loop expiry from Claude Code 2.1.330 #17935).
    • Past day 7 the gate drops the record and later Stop events pass unguarded, so the longer lifetime keeps the guard on; it loosens nothing.
    • One constant: two hand-kept copies of the same age already exist and can drift.

    Done when:

    • plugins/autonomy/hooks/lane-stop-gate-lib.sh defines the arm record lifetime once, in days, set to 31
    • GATE_ARM_TTL_SECONDS in plugins/autonomy/hooks/lane-stop-gate.sh is derived from that constant
    • The find -mtime sweep in plugins/autonomy/hooks/lane-stop-gate-arm.sh uses that constant
    • plugins/autonomy/README.md and the hook header comments state 31 days
    • plugins/autonomy/hooks/lane-stop-gate.test.sh covers a record aged 8 days (still armed) and one aged 32 days (expired), and passes
  8. removed
    needs-triage
    on Nov 22, 2026
  9. melodic-automation-lanes commented on Nov 22, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"18e02a8905b900d54cc82b5b47a61150a7b1a1902cd87c4d96143da11153d50a","body_sha256":"e3391cc838c4c690de8dce33ed3542c604ed12e70afc0d14a5a141416d6c6d80"}

  10. github-actions commented on Nov 22, 2026

    @github-actions
    Contributor
    No description provided.
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

    No labels
    No labels

    Type

    Fields

    Work status

    needs-triage

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions