Skip to content

docs: document build optimization flags in contributor guide#2103

Merged
botantler[bot] merged 9 commits intomainfrom
docs/document-build-optimizations-759e3b5e17a2f37d
Feb 11, 2026
Merged

docs: document build optimization flags in contributor guide#2103
botantler[bot] merged 9 commits intomainfrom
docs/document-build-optimizations-759e3b5e17a2f37d

Conversation

@botantler
Copy link
Contributor

@botantler botantler bot commented Feb 8, 2026

Summary

Documents the -ldflags="-s -w" build optimization flags introduced in #2095, helping contributors understand the difference between development builds and release artifacts.

Changes

CONTRIBUTING.md

  • Added production build command example with optimization flags
  • Added note explaining the 28% binary size reduction (302MB → 217MB)
  • Clarified that development builds include debug symbols for better debugging

.github/copilot-instructions.md

  • Added optimization command and explanation to the build section
  • Maintains consistency with the contributor guide

Motivation

After the recent build optimization changes (#2095), contributors might notice their local builds are significantly larger than release artifacts. This documentation:

  1. Explains the discrepancy between local (302MB) and release (217MB) builds
  2. Educates contributors about a common Go optimization technique
  3. Provides transparency about the build process
  4. Offers choice - developers can use optimized builds locally if desired

Testing

  • ✅ Markdown syntax validated
  • ✅ Changes are minimal and documentation-only
  • ✅ No code changes, so no functional testing required

Related

AI generated by Update Docs

Add documentation for -ldflags="-s -w" build optimization that reduces
binary size by ~28% (302MB → 217MB). This helps contributors understand
the difference between development builds and release artifacts.

Changes:
- CONTRIBUTING.md: Add production build command with optimization flags
- .github/copilot-instructions.md: Add optimization note to build section

Relates to: #2095
@github-project-automation github-project-automation bot moved this to 🏃🏻‍♂️ In Progress in 🌊 Project Board Feb 8, 2026
@github-project-automation github-project-automation bot moved this from 🏃🏻‍♂️ In Progress to 🚀 In Finalization in 🌊 Project Board Feb 8, 2026
@devantler devantler marked this pull request as ready for review February 8, 2026 22:49
Copilot AI review requested due to automatic review settings February 8, 2026 22:49
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2026

⚠️MegaLinter analysis: Success with warnings

⚠️ MARKDOWN / markdownlint - 36 errors
.github/aw/create-agentic-workflow.md:84 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Read the gh-aw instructions"]
.github/aw/create-shared-agentic-workflow.md:16 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Build on agentic workflows"]
.github/aw/create-shared-agentic-workflow.md:23 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Prefer Docker Solutions"]
.github/aw/create-shared-agentic-workflow.md:30 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Support Read-Only Tools"]
.github/aw/create-shared-agentic-workflow.md:37 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Move Write Operations to Safe ..."]
.github/aw/create-shared-agentic-workflow.md:44 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Process Agent Output in Safe J..."]
.github/aw/create-shared-agentic-workflow.md:57 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Documentation"]
.github/aw/create-shared-agentic-workflow.md:153 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Example: Processing Agent Outp..."]
.github/aw/debug-agentic-workflow.md:19 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Example: Debugging from a work..."]
.github/aw/debug-agentic-workflow.md:25 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:39 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:53 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Prerequisites"]
.github/aw/debug-agentic-workflow.md:60 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Key Commands Available"]
.github/aw/debug-agentic-workflow.md:91 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:124 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:162 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:199 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:208 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:218 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:256 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/debug-agentic-workflow.md:468 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/serena-tool.md:118 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/serena-tool.md:126 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/serena-tool.md:135 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/serena-tool.md:174 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/update-agentic-workflow.md:58 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Read the gh-aw instructions"]
.github/aw/update-agentic-workflow.md:523 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/aw/upgrade-agentic-workflows.md:13 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Prerequisites"]
.github/aw/upgrade-agentic-workflows.md:20 error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Key Commands Available"]
.github/aw/upgrade-agentic-workflows.md:265 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/skills/refactor/SKILL.md:37 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/skills/refactor/SKILL.md:563 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
.github/workflows/update-docs.md:152 error MD028/no-blanks-blockquote Blank line inside blockquote
docs/src/content/docs/faq.md:204 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "``````"]
pkg/svc/chat/docs/faq.md:204 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "``````"]
vsce/README.md:98 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]

✅ Linters with no issues

actionlint, bash-exec, git_diff, hadolint, jscpd, jsonlint, lychee, markdown-table-formatter, prettier, prettier, shellcheck, shfmt, stylelint, syft, trivy-sbom, trufflehog, v8r, v8r, yamllint

See detailed reports in MegaLinter artifacts

MegaLinter is graciously provided by OX Security

Copy link
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

Documents Go release build optimization flags (-ldflags="-s -w") so contributors understand why local development builds can be larger than release artifacts, aligning contributor guidance with the existing GoReleaser/CI configuration introduced in #2095.

Changes:

  • Add an optimized go build example using -ldflags="-s -w" to CONTRIBUTING.md.
  • Add the same optimized build guidance to .github/copilot-instructions.md for consistency.
  • Explain that stripping debug symbols reduces binary size (with an example measurement).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
CONTRIBUTING.md Adds dev vs release/optimized build commands and an explanatory note about -ldflags="-s -w".
.github/copilot-instructions.md Mirrors the optimized build command + explanation in Copilot’s contributor instructions.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Nikolai Emil Damm <ned@devantler.tech>
Copilot AI review requested due to automatic review settings February 8, 2026 22:54
@botantler botantler bot enabled auto-merge February 8, 2026 22:54
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Nikolai Emil Damm <ned@devantler.tech>
Copy link
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Nikolai Emil Damm <ned@devantler.tech>
Copilot AI review requested due to automatic review settings February 8, 2026 23:02
@devantler
Copy link
Contributor

@copilot consider applying changes based on the comments in this thread. If feedback is valid apply it, otherwise ignore it.

Copy link
Contributor

Copilot AI commented Feb 8, 2026

@devantler I've opened a new pull request, #2105, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Copilot AI and others added 2 commits February 9, 2026 00:09
…se parity (#2105)

* Initial plan

* docs: use distinct binary name for optimized builds and clarify wording

Co-authored-by: devantler <26203420+devantler@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devantler <26203420+devantler@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 8, 2026 23:21
Copy link
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Copy link
Contributor

Copilot AI commented Feb 9, 2026

@devantler I've opened a new pull request, #2110, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI review requested due to automatic review settings February 9, 2026 01:10
Copy link
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@botantler botantler bot added this pull request to the merge queue Feb 11, 2026
Merged via the queue into main with commit 6434728 Feb 11, 2026
35 checks passed
@botantler botantler bot deleted the docs/document-build-optimizations-759e3b5e17a2f37d branch February 11, 2026 19:15
@github-project-automation github-project-automation bot moved this from 🚀 In Finalization to ✅ Done in 🌊 Project Board Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants