Policy: replace an agent's copied footer with the policy's own #42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dario/policy-own-footer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Evidence
On #28, comment 392 by the implementer (run
20261120-131013-…-27-401ce9) ended with the old footer, "Written by an AI agent (factory) using this account", although #39 was in the binary. The session shows the model wrote that footer and the marker into the body itself, copied from earlier comments. The policy left texts that already carried<!-- factory:agent -->unmarked, so it posted the copy as is.Changes
internal/forge/policy.go: with a personal account, the policy now removes the marker everywhere in the text, and any trailing<sub>🤖 …</sub>footer (with or without the---line), before it adds its own footer. Every text ends with exactly one footer, which names the agent that actually posted it. Marking twice gives the same text.Test evidence
just check: passesTestPersonalAccount:🤖 Generated with Claude Code