Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/delegation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<!-- @include: @/parts/examples/delegation-examples-test.rb-test-budgets-layer:-the-agent-wide-ceiling-and-the-per-delegation-limit.md -->
<!-- @include: @/parts/examples/delegation-examples-test.rb-test-budgets-layer--the-agent-wide-ceiling-and-the-per-delegation-limit.md -->

| Limit | Unit | Meaning |
|:------|:-----|:--------|
Expand Down
15 changes: 14 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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") }
Expand All @@ -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"
Expand Down