Hackpert: defend loop reason strings from caller mutation #149

Open
nsaspy wants to merge 2 commits from hackpert/loop-reason-copy into master
Owner

Slice

Bug-first hardening for #29: expert-loop-state owns mutable last-reason metadata just like its operation/run scope strings, and operator access must not expose the stored string.

RED-first proof

Test-only head eeb953068ea0d3897714fe082bca77d364f423f4 mutates both the caller-owned source string and the accessor-returned string. Current master stores/returns last-reason directly, so common-lisp-core should fail at the new regression before implementation.

Ownership

Hackpert loop state/tests only. No database internals and no StarIntel product work.

## Slice Bug-first hardening for #29: `expert-loop-state` owns mutable `last-reason` metadata just like its operation/run scope strings, and operator access must not expose the stored string. ## RED-first proof Test-only head `eeb953068ea0d3897714fe082bca77d364f423f4` mutates both the caller-owned source string and the accessor-returned string. Current `master` stores/returns `last-reason` directly, so `common-lisp-core` should fail at the new regression before implementation. ## Ownership Hackpert loop state/tests only. No database internals and no StarIntel product work.
fix: snapshot mutable loop reason strings
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 7s
core / common-lisp-core (pull_request) Failing after 1m8s
monorepo / hygiene (pull_request) Successful in 4m19s
471cde75f2
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 7s
core / common-lisp-core (pull_request) Failing after 1m8s
monorepo / hygiene (pull_request) Successful in 4m19s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin hackpert/loop-reason-copy:hackpert/loop-reason-copy
git switch hackpert/loop-reason-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 hackpert/loop-reason-copy
git switch hackpert/loop-reason-copy
git rebase master
git switch master
git merge --ff-only hackpert/loop-reason-copy
git switch hackpert/loop-reason-copy
git rebase master
git switch master
git merge --no-ff hackpert/loop-reason-copy
git switch master
git merge --squash hackpert/loop-reason-copy
git switch master
git merge --ff-only hackpert/loop-reason-copy
git switch master
git merge hackpert/loop-reason-copy
git push origin master
Sign in to join this conversation.
No description provided.