feat: add air-gapped docs bundle support#10042
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7693fc5ed6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| # ------------------------------------ | ||
| # 4) Build Docs Bundle | ||
| # ------------------------------------ | ||
| docs-bundle: |
There was a problem hiding this comment.
Let docs-only pushes refresh the docs bundle
This new release artifact is inside a workflow whose trigger still ignores documentation/** (lines 5-9), and GitHub's workflow docs state that when branch and path filters are both defined the run only starts when both are satisfied (https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onpushpull_requestpull_request_targetpathspaths-ignore). On a docs-only push to main, the entire canary workflow is skipped, so docs-bundle never rebuilds and the published goose-docs.tar.gz stays stale until a non-docs change lands; the same pattern exists in release.yml for release branches.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Thanks for the thorough review! This is actually already handled.
docs-bundle.yml is a standalone reusable workflow with its own on.push trigger that explicitly fires on documentation/** changes to main and release/* branches:
on:
workflow_call: # called from canary.yml / release.yml
inputs:
force_build: ...
push: # independent trigger for docs-only pushes
branches:
- main
- "release/*"
paths:
- "documentation/**"
workflow_dispatch:So the two scenarios are covered independently:
| Scenario | Execution path | Docs bundle built? |
|---|---|---|
docs-only push to main |
docs-bundle.yml own on.push trigger |
✅ Yes |
| Canary release (code change) | canary.yml → docs-bundle job (force_build: true) |
✅ Yes |
| Tag release | release.yml → docs-bundle job (force_build: true) |
✅ Yes |
When a docs-only push lands on main, canary.yml is indeed skipped due to paths-ignore: ["documentation/**"], but docs-bundle.yml runs on its own and rebuilds + republishes goose-docs.tar.gz to the canary release. The paths-ignore in canary.yml is intentional — it avoids running the full canary pipeline (CLI build, desktop bundles, etc.) when only documentation changed.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c371cf211c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| --- | ||
| name: goose-doc-guide | ||
| description: Reference goose documentation to create, configure, or explain goose-specific features like recipes, extensions, sessions, and providers. You MUST fetch relevant goose docs before answering. You MUST NOT rely on training data or assumptions for any goose-specific fields, values, names, syntax, or commands. | ||
| description: Reference goose documentation to create, configure, or explain goose-specific features like recipes, extensions, sessions, and providers. You MUST read or fetch relevant goose docs before answering. You MUST NOT rely on training data or assumptions for any goose-specific fields, values, names, syntax, or commands. |
There was a problem hiding this comment.
Update the platform-extension snapshot
Changing this builtin skill description also changes the text that SkillsClient::get_instructions injects into the all-platform-extension system prompt, but crates/goose/src/agents/snapshots/goose__agents__prompt_manager__tests__all_platform_extensions.snap still expects the old “MUST fetch relevant goose docs” wording at line 127. With snapshots checked, cargo test -p goose agents::prompt_manager::tests::test_all_platform_extensions will fail until the snapshot is regenerated or updated.
Useful? React with 👍 / 👎.
|
Good addition! The docs-bundle workflow for air-gapped environments is useful for organizations that can't access external docs. Clean CI integration. |
Summary
Closes #9981.
Adds support for publishing an air-gapped goose docs bundle and configuring
goose-doc-guideto read from a local or mirrored docs root.This lets users in restricted or offline environments download
goose-docs.tar.gz, extract it, and pointGOOSE_DOCS_ROOTat the extractedgoose-docs/directory.What changed
Docs bundle
Adds a docs bundle generator:
documentation/scripts/generate-docs-bundle.jsdocumentation/scripts/generate-docs-bundle.test.jsThe generated archive has this layout:
The bundle includes
goose-docs-map.mdand the docs sections used bygoose-doc-guide.MDX files are normalized to
.mdpaths inside the archive so they match docs map entries.Release assets
Adds a
docs-bundlejob to:.github/workflows/release.yml.github/workflows/canary.ymlThe job:
goose-docs-map.mddocumentation/goose-docs.tar.gzgoose-docsartifactThe upload step uses
if-no-files-found: errorso missing docs bundles fail the workflow instead of silently warning.goose-doc-guideUpdates the built-in
goose-doc-guideskill to resolve docs in this order:GOOSE_DOCS_ROOTfrom gooseconfig.yamlif configured and non-emptyhttps://goose-docs.aiGOOSE_DOCS_ROOTmay point to either:The skill still requires reading
goose-docs-map.mdfirst and only using exact paths listed in the map.When local docs are used, final documentation links are converted to canonical
https://goose-docs.ai/...URLs so local filesystem paths are not exposed in answers.Config docs
Documents
GOOSE_DOCS_ROOTin the config files guide as a config-file setting:Verification
Ran documentation tests:
Result:
Generated docs map and bundle:
cd documentation node scripts/generate-docs-map.js node scripts/generate-docs-bundle.jsVerified archive layout:
Extracted the archive and verified all docs map paths resolve inside the extracted bundle:
Ran Rust verification:
Validated workflow YAML and whitespace:
ruby -e 'require "yaml"; ARGV.each { |file| YAML.load_file(file); puts "parsed #{file}" }' \ .github/workflows/release.yml \ .github/workflows/canary.yml git diff --checkRan CodeRabbit review on the final squashed commit and addressed the reported feedback.
Notes
This PR does not add installer automation. Users or administrators who need offline docs should download
goose-docs.tar.gz, extract it, and pointGOOSE_DOCS_ROOTat the extractedgoose-docs/directory.