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"