Hackpert: defend loop scope strings from caller mutation #150

Open
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 currently retains caller-owned operation/run strings and exposes those mutable strings through generated accessors. A caller can therefore rewrite the scope identity after state construction, undermining later operation/run scope validation.

This PR starts RED-first with a regression proving both constructor aliasing and accessor aliasing. The implementation will make loop scope identity an owned defensive snapshot without changing reasoning strategy, authority, provider execution, persistence, or database internals.

Boundary

  • Hackpert-owned loop state only.
  • No source/hackmode-database/** changes.
  • No StarIntel product work.
  • No new executor, database, graph store, or KB authority.
## Slice Bug-first hardening for #29 / #27. `expert-loop-state` currently retains caller-owned operation/run strings and exposes those mutable strings through generated accessors. A caller can therefore rewrite the scope identity after state construction, undermining later operation/run scope validation. This PR starts RED-first with a regression proving both constructor aliasing and accessor aliasing. The implementation will make loop scope identity an owned defensive snapshot without changing reasoning strategy, authority, provider execution, persistence, or database internals. ## Boundary - Hackpert-owned loop state only. - No `source/hackmode-database/**` changes. - No StarIntel product work. - No new executor, database, graph store, 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
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
This pull request has changes conflicting with the target branch.
  • source/hackmode-core/expert/loop.lisp
  • source/hackmode-core/tests/expert-loop-scope-copy.lisp
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin hackmode-rage-hackpert/29-loop-scope-defensive-copy:hackmode-rage-hackpert/29-loop-scope-defensive-copy
git switch hackmode-rage-hackpert/29-loop-scope-defensive-copy

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff hackmode-rage-hackpert/29-loop-scope-defensive-copy
git switch hackmode-rage-hackpert/29-loop-scope-defensive-copy
git rebase master
git switch master
git merge --ff-only hackmode-rage-hackpert/29-loop-scope-defensive-copy
git switch hackmode-rage-hackpert/29-loop-scope-defensive-copy
git rebase master
git switch master
git merge --no-ff hackmode-rage-hackpert/29-loop-scope-defensive-copy
git switch master
git merge --squash hackmode-rage-hackpert/29-loop-scope-defensive-copy
git switch master
git merge --ff-only hackmode-rage-hackpert/29-loop-scope-defensive-copy
git switch master
git merge hackmode-rage-hackpert/29-loop-scope-defensive-copy
git push origin master
Sign in to join this conversation.
No description provided.