Skip to content

feat: increase agent trace max length to 1024#1211

Merged
JackZhao10086 merged 1 commit into
mainfrom
feat/header_trace
Jun 2, 2026
Merged

feat: increase agent trace max length to 1024#1211
JackZhao10086 merged 1 commit into
mainfrom
feat/header_trace

Conversation

@JackZhao10086
Copy link
Copy Markdown
Collaborator

@JackZhao10086 JackZhao10086 commented Jun 2, 2026

Summary

increase agent trace max length to 1024

Changes

Test Plan

Related Issues

Summary by CodeRabbit

  • Enhancement
    • Increased the maximum length limit for trace configuration values, enabling longer trace identifiers to be accepted and included in request headers.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9f9073e8-b22c-4405-9567-99245e0d9c01

📥 Commits

Reviewing files that changed from the base of the PR and between f65712c and fdd3e4d.

📒 Files selected for processing (1)
  • internal/cmdutil/secheader.go

📝 Walkthrough

Walkthrough

The LARKSUITE_CLI_AGENT_TRACE environment variable maximum length limit is increased from 256 to 1024 characters in the security header configuration. The AgentTraceValue() function will now accept longer trace values when setting the X-Agent-Trace header.

Changes

Agent Trace Header Length Limit

Layer / File(s) Summary
Agent trace maximum length constant update
internal/cmdutil/secheader.go
The agentTraceMaxLen constant is increased from 256 to 1024, permitting longer LARKSUITE_CLI_AGENT_TRACE environment values to be validated and included in the X-Agent-Trace security header.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • larksuite/cli#1158: Modifies the same agentTraceMaxLen constant and AgentTraceValue() validation logic for LARKSUITE_CLI_AGENT_TRACE in the security header configuration.

Suggested labels

size/M

Suggested reviewers

  • liangshuo-1

Poem

🐰 A trace grows long, from 256 to 1024,
Security headers now mark a wider path,
Longer stories told in the agent's dance,
Headers whisper with extended cadence! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is largely incomplete with empty Changes and Test Plan sections that fail to document the modifications or verification approach. Provide specific details about what changed and how the modification was tested. Fill in the Changes section with the actual code modification and the Test Plan with verification steps.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: increasing the agent trace maximum length from 256 to 1024 bytes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/header_trace

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the size/M Single-domain feat or fix with limited business impact label Jun 2, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.21%. Comparing base (0bdd7de) to head (fdd3e4d).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1211      +/-   ##
==========================================
+ Coverage   69.14%   69.21%   +0.06%     
==========================================
  Files         630      633       +3     
  Lines       59310    59563     +253     
==========================================
+ Hits        41011    41227     +216     
- Misses      14988    15015      +27     
- Partials     3311     3321      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@fdd3e4d80046e3550100d8dc3174b27452179bb9

🧩 Skill update

npx skills add larksuite/cli#feat/header_trace -y -g

@JackZhao10086 JackZhao10086 merged commit bc8e9bd into main Jun 2, 2026
21 checks passed
@JackZhao10086 JackZhao10086 deleted the feat/header_trace branch June 2, 2026 03:08
@liangshuo-1 liangshuo-1 mentioned this pull request Jun 2, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants