From 980ad8d7384c12a096f355fce5ce4a21db7fdba5 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 17 Aug 2026 23:09:05 +0000 Subject: [PATCH] Stop a colon in a test name from failing every Pages deploy The docs deploy has failed on every push since #360. The site builds fine; upload-artifact then rejects the whole upload: The path for one of the files in artifact is not valid: /parts/examples/delegation-examples-test.rb-test-budgets-layer:-the- agent-wide-ceiling-and-the-per-delegation-limit.html Contains the following character: Colon : doc_example_output names its output after the test, "budgets layer: the agent-wide ceiling..." keeps its colon through dasherize, VitePress emits a page at that path, and the action refuses the characters NTFS cannot store. So docs.activeagents.ai has been serving pre-#360 content for three days, including the SolidAgent section merged in #364. Sanitized in the helper rather than by renaming the test: the next colon in a test name would otherwise break the deploy again, and nothing in the failure points at the test that caused it. The one include referencing the old filename moves with it. Also fixes the "no status" cross-repo integration badge. A workflow_call run is attributed to the caller, so integration.yml had no runs of its own however often it passed. It now triggers itself on main, and ci.yml calls it for pull requests only, so there is one check per PR and a badge that reflects main. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01NGn2NzpzFZT4JGKBdFMpxh --- .github/workflows/ci.yml | 4 ++++ .github/workflows/integration.yml | 7 +++++++ docs/actions/delegation.md | 2 +- test/test_helper.rb | 15 ++++++++++++++- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db4d9fe6..33e05481 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,11 @@ jobs: # activeagent + actionagent against solid_agent, in both the combination # this repository develops against and the one users install today. See # .github/workflows/integration.yml. + # + # Pull requests only: on main that workflow triggers itself, so its runs + # are attributed to it and its status badge means something. integration: + if: github.event_name == 'pull_request' uses: ./.github/workflows/integration.yml secrets: inherit diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index e8b377dd..463af28e 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -38,6 +38,13 @@ on: types: [ solid-agent-changed ] schedule: - cron: "0 6 * * *" + # Runs here rather than through ci.yml on main. A workflow_call run is + # attributed to the caller, so this workflow had no runs of its own and + # its status badge read "no status" however often the suite passed. + # ci.yml keeps calling it for pull requests, where the badge is irrelevant + # and one combined check is what reviewers want. + push: + branches: [ main ] jobs: integration: diff --git a/docs/actions/delegation.md b/docs/actions/delegation.md index 565d3412..73394858 100644 --- a/docs/actions/delegation.md +++ b/docs/actions/delegation.md @@ -139,7 +139,7 @@ delegate_to KnowledgeBaseAgent, budget: { max_calls: 3, max_tokens: 20_000 } Both apply — a call has to clear the agent-wide ceiling *and* its own limit. - + | Limit | Unit | Meaning | |:------|:-----|:--------| diff --git a/test/test_helper.rb b/test/test_helper.rb index 86d61402..5a7e6761 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -38,6 +38,18 @@ def extract_path_info(caller_info) end end +# Test names become filenames, and those filenames become artifact paths on +# the docs deploy. actions/upload-artifact rejects a handful of characters +# outright — a colon in one test name failed every Pages deploy from the +# moment it was added, after the docs themselves had built fine. +# +# The rejected set is the action's own: " : < > | * ? \r \n +DOC_EXAMPLE_UNSAFE_CHARACTERS = /["*:<>?|\r\n]/ + +def doc_example_filename_safe(name) + name.to_s.gsub(DOC_EXAMPLE_UNSAFE_CHARACTERS, "-") +end + def doc_example_output(example = nil, test_name = nil) # Extract caller information caller_info = caller.find { |line| line.include?("_test.rb") } @@ -49,8 +61,9 @@ def doc_example_output(example = nil, test_name = nil) end path_info = extract_path_info(caller_info) - file_name = path_info[:file_name].dasherize + file_name = doc_example_filename_safe(path_info[:file_name].dasherize) test_name ||= name.to_s.dasherize if respond_to?(:name) + test_name = doc_example_filename_safe(test_name) file_path = Rails.root.join("..", "..", "docs", "parts", "examples", "#{file_name}-#{test_name}.md") # puts "\nWriting example output to #{file_path}\n"