Hackpert: defend loop scope strings from caller mutation #75

Closed
nsaspy wants to merge 3 commits from hackmode-rage-hackpert/29-loop-scope-defensive-copy into master
Owner

Slice

Bug-first hardening for #29 / #27.

expert-loop-state retained caller-owned operation/run strings and exposed those mutable strings through accessors. A caller could therefore rewrite scope identity after construction, undermining later operation/run scope validation.

RED was established on fcffc429a03ec2755fd5255695eaeb44b503e548: common-lisp-core failed while hygiene and the product-tree boundary passed.

The implementation on a13e9cab27672b481b88073139daccb5dca7db0e makes loop scope strings owned defensive snapshots at construction, copy, and public accessor boundaries. The exact head is GREEN on common-lisp-core, hygiene, and the product-tree boundary.

This non-draft PR replaces draft #127 on the identical head because the ready-for-review GraphQL mutation is currently broken by GitHub connector fullDatabaseId schema handling.

Boundary

  • Hackpert-owned loop state only.
  • No source/hackmode-database/** changes.
  • No StarIntel product work.
  • No authority change, provider execution change, second scheduler, graph store, database, or KB authority.
## Slice Bug-first hardening for #29 / #27. `expert-loop-state` retained caller-owned operation/run strings and exposed those mutable strings through accessors. A caller could therefore rewrite scope identity after construction, undermining later operation/run scope validation. RED was established on `fcffc429a03ec2755fd5255695eaeb44b503e548`: `common-lisp-core` failed while hygiene and the product-tree boundary passed. The implementation on `a13e9cab27672b481b88073139daccb5dca7db0e` makes loop scope strings owned defensive snapshots at construction, copy, and public accessor boundaries. The exact head is GREEN on common-lisp-core, hygiene, and the product-tree boundary. This non-draft PR replaces draft #127 on the identical head because the ready-for-review GraphQL mutation is currently broken by GitHub connector `fullDatabaseId` schema handling. ## Boundary - Hackpert-owned loop state only. - No `source/hackmode-database/**` changes. - No StarIntel product work. - No authority change, provider execution change, second scheduler, graph store, database, or KB authority.
fix: own defensive expert loop scope snapshots
Some checks failed
agent-pr-serialization / one-open-pr-per-agent-lane (pull_request_target) Failing after 1s
agent-framework-boundary / keep-agent-framework-out-of-product-tree (pull_request) Successful in 22s
core / common-lisp-core (pull_request) Failing after 1m3s
monorepo / hygiene (pull_request) Successful in 3m16s
a13e9cab27
nsaspy closed this pull request 2026-09-04 20:56:06 +00:00
Some checks failed
agent-pr-serialization / one-open-pr-per-agent-lane (pull_request_target) Failing after 1s
agent-framework-boundary / keep-agent-framework-out-of-product-tree (pull_request) Successful in 22s
core / common-lisp-core (pull_request) Failing after 1m3s
monorepo / hygiene (pull_request) Successful in 3m16s

Pull request closed

Sign in to join this conversation.
No description provided.