Skip to content

Normalized the AI disclosure comment to one fixed line per file - #740

Merged
fdesbiens merged 1 commit into
eclipse-threadx:devfrom
fdesbiens:chore/normalize-ai-disclosure
Sep 15, 2026
Merged

fdesbiens merged 1 commit into
eclipse-threadx:devfrom
fdesbiens:chore/normalize-ai-disclosure

Conversation

@fdesbiens

Copy link
Copy Markdown
Contributor

The per-edit AI disclosure named the product and model, so every agent and every
model version appended another line. Agents were deduplicating on exact string
match, which a version bump defeats: Codex (gpt 5.4), Codex (gpt 5.5),
Codex (GPT-5) and Codex (gpt-5.6-sol) are four lines for one product.

Before
Files with a disclosure line 455
…carrying 2, 3 or 4 of them 44 / 15 / 15
Distinct spellings of ~5 products 13
Assembly lines with a doubled marker 20

Worst case, ports/cortex_m4/gnu/inc/tx_port.h carried four lines naming Gemini,
Copilot twice and Claude Code.

Every file now carries exactly one, fixed text naming no product:

Portions of this file were generated with AI assistance.

written with the comment character that file already uses, so ; and @
assembly files keep theirs and the doubled ; // and @ // forms are gone.

Precise attribution moves to where it is already mandated and already accurate:
the Assisted-by trailer, which is per-change, dated and attached to its diff.
git log --format='%h %(trailers:key=Assisted-by,valueonly)' -- <path> answers
"which agents touched this file" better than the header ever did. The header line
could not stay honest, because the code it named gets rewritten and the line
stays -- files credited Gemini 58 times against one Gemini commit in history.

Comment-only. 455 files, 455 insertions, 574 deletions; every removed line was a
disclosure line, every added line is the fixed text, and no file is left with
zero or more than one. scripts/check_ports.sh passes, including the check that
would catch a ports_arch master and its generated copies drifting apart.
Recompiled against dev, every file that builds without a vendor toolchain is
byte-identical: 19/19 C under common, 100/100 GNU assembly, and all 16
assemblable files whose marker changed. The 10 remaining marker changes are ac5
and IAR sources where ; already started the comment and only a redundant //
came off.

Not covered here, and left alone deliberately: five new-file AI Disclosure:
headers are malformed -- four say "Claude Code" with no model, one says "Claude
Opus 5" with no product. Fixing those means guessing which version wrote them,
so they need a human decision rather than a script.

The per-edit disclosure named the product and model, so every agent and every
model version appended another line. 74 files carried two to four of them, and
the same five products had accumulated 13 spellings -- Copilot against GitHub
Copilot, Claude Sonnet 4.6 against claude-sonnet-4.6, four spellings of Codex.
Twenty assembly lines carried a doubled comment marker, `; //` or `@ //`.

Every file now carries exactly one line, fixed text naming no product:

    Portions of this file were generated with AI assistance.

It is written with the comment character that file already uses, so the `;`
and `@` assembly files keep theirs and the doubled markers are gone. Precise
attribution stays on the commit, where the Assisted-by trailer is per-change,
dated and attached to the diff it describes. A header line cannot hold that
record honestly, because the code it names gets rewritten and the line stays.
A file-level flag answers whether; the history answers who.

Comment-only. 455 files, 455 insertions and 574 deletions: every removed line
was a disclosure line, every added line is the fixed text, and no file is left
with zero or with more than one. `scripts/check_ports.sh` passes, including the
reproducibility check that would catch a ports_arch master and its generated
copies drifting apart. Recompiled against dev, every file that builds without a
vendor toolchain gives a byte-identical object: 19 of 19 C files under common,
100 of 100 GNU assembly files, and all 16 assemblable files whose comment
marker changed. The 10 remaining marker changes are ac5 and IAR sources where
`;` already started the comment and only the redundant `//` was removed.

Assisted-by: Claude Code (Opus 5) <noreply@anthropic.com>
@fdesbiens
fdesbiens merged commit 9e4c571 into eclipse-threadx:dev Sep 15, 2026
19 checks passed
@fdesbiens
fdesbiens deleted the chore/normalize-ai-disclosure branch September 15, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant