Skip to content

Stop appending effective-token suffixes in default JavaScript-generated footers#37042

Merged
pelikhan merged 3 commits into
mainfrom
copilot/remove-effective-tokens-footer
Jun 5, 2026
Merged

Stop appending effective-token suffixes in default JavaScript-generated footers#37042
pelikhan merged 3 commits into
mainfrom
copilot/remove-effective-tokens-footer

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 5, 2026

Default footer generation in the JavaScript safe-output path was still appending effective-token text, which made generated attribution lines noisier than intended. This change removes effective-token suffixes from default footer text while keeping explicit token placeholders available for custom templates.

  • Footer rendering behavior

    • Updated actions/setup/js/messages_footer.cjs to stop appending {effective_tokens_suffix} in default footer paths:
      • getFooterMessage(...) (Generated by ...)
      • getFooterAgentFailureIssueMessage(...) (Generated from ...)
      • getFooterAgentFailureCommentMessage(...) (Generated from ...)
    • Existing AI credits and history-link behavior in default footers remains unchanged.
  • Custom template compatibility

    • Preserved support for token placeholders in custom message templates.
    • Workflows that explicitly use {effective_tokens_suffix} in configured custom footers continue to render token values.
  • Spec-aligned test updates

    • Updated actions/setup/js/messages.test.cjs expectations to reflect that default generated footers no longer include effective-token suffixes.
    • Kept custom-template token placeholder assertions intact.
// Before (default footer path)
let defaultFooter = `> Generated by [${workflowLabel}]({run_url})`;
if (effectiveTokens) defaultFooter += effectiveTokensSuffix;

// After
let defaultFooter = `> Generated by [${workflowLabel}]({run_url})`;

Copilot AI and others added 3 commits June 5, 2026 02:43
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Remove effective tokens from generated JavaScript footers Stop appending effective-token suffixes in default JavaScript-generated footers Jun 5, 2026
Copilot AI requested a review from pelikhan June 5, 2026 02:47
@pelikhan pelikhan marked this pull request as ready for review June 5, 2026 03:17
Copilot AI review requested due to automatic review settings June 5, 2026 03:17
@pelikhan pelikhan merged commit b357516 into main Jun 5, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/remove-effective-tokens-footer branch June 5, 2026 03:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes “effective token” suffix text from the default JavaScript safe-output footer rendering so generated attribution lines are less noisy, while preserving {effective_tokens_suffix} support for custom templates.

Changes:

  • Updated default footer generation in messages_footer.cjs to stop appending effective-token suffixes for getFooterMessage, getFooterAgentFailureIssueMessage, and getFooterAgentFailureCommentMessage.
  • Updated messages.test.cjs expectations to reflect the new default footer output while keeping custom-template placeholder behavior covered.
Show a summary per file
File Description
actions/setup/js/messages_footer.cjs Stops appending effective-token suffixes in default footer paths while keeping template placeholders available.
actions/setup/js/messages.test.cjs Updates tests to assert default footers no longer include effective-token suffixes; custom template behavior remains tested.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

});

it("should preserve mini-tier gpt identifiers in footer suffixes", async () => {
it("should not include mini-tier model identifiers in default footer suffixes", async () => {
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.

3 participants