Skip to content

Add opt-in docs artifact upload to documentation.yml - #146

Merged
ChrisRackauckas merged 3 commits into
SciML:masterfrom
isaacsas:docs-upload-artifact
Nov 30, 2026
Merged

ChrisRackauckas merged 3 commits into
SciML:masterfrom
isaacsas:docs-upload-artifact

Conversation

@isaacsas

@isaacsas isaacsas commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

🚧 UNREVIEWED AI-UPDATED DESCRIPTION. This PR was opened by @isaacsas; this description was updated by an AI agent running as @ChrisRackauckas and has not been reviewed by Chris.
Harness: Codex desktop 0.171.0-alpha.13.2 · Model: GPT-6 (exact model ID unknown)
Conversation: local session 01a22257-20a4-7960-91bd-006b2ea596b6 (no session URL)

Fork pull requests cannot deploy a documentation preview, so callers need a way to retrieve the rendered site. This adds an opt-in upload of docs/build to the reusable documentation workflow.

Input Type Default Description
upload-artifact boolean false Upload the built documentation after a successful build.
artifact-name string docs-artifact Artifact name; use distinct names for parallel documentation jobs.
artifact-retention-days number 3 Artifact retention in days; 0 uses the repository default.

An enabled upload fails if docs/build contains no files. The upload does not overwrite an artifact of the same name. The README includes a matrix example with distinct artifact names. The upload runs on each successful opted-in build, including pushes and pull requests, before coverage processing.

Validation

  • julia +1.12 --compiled-modules=existing --startup-file=no --color=no test/runtests.jl: 150 assertions passed on the base-refreshed tree. The 11-assertion workflow-contract test failed 5 assertions on the prior configuration and passed all 11 with the fix.
  • Runic 1.9.0, actionlint 1.7.12 with ShellCheck, typos, git diff --check, and the nine Python resolver tests passed locally. GitHub CI results appear on this PR.
  • A GitHub Actions probe called the reusable workflow at commit a4e3532. Two builds uploaded artifacts with distinct names; a verification job downloaded both and checked their contents. A third build intentionally produced no docs/build files and failed at the upload step, so the overall probe run is intentionally red. The later base update did not change the artifact workflow.
  • The scope of this probe is the named-artifact and missing-output paths; it does not cover every caller configuration. There is no root package QA group or documentation build in this repository.

The new inputs reach callers using @v1 after the maintained v1 tag is updated.


🤖 Posted by an AI agent — harness: Codex desktop 0.171.0-alpha.13.2 · model: GPT-6 (exact model ID unknown)
Conversation: local session 01a22257-20a4-7960-91bd-006b2ea596b6 (no session URL)

Pull requests from forks cannot deploy a Documenter preview, so the
reusable documentation workflow only reports whether their docs build,
and reviewers have no way to look at the rendered pages. Callers of a
reusable workflow cannot add steps to its job, so packages that moved
from an inline docs workflow (which could upload docs/build itself) to
this one lost that option.

Add an `upload-artifact` input (default false, so existing callers are
unaffected) that uploads docs/build as the `docs-artifact` workflow
artifact after a successful build, and an `artifact-retention-days`
input (default 3) to control how long it is kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #146

Reviewed head: efc50fc
Raw SHA-256: e1226494c909b97e3af17fb16af59679bb99d0fd982635321bdeda39f86d91d2
Source SHA-256: 0b6d915e16a4a98e7e51a10cb737036ac3bca538354e1a006b967d1f1c5d7a30
Source: standard-review-v1 (harness-log)
Reviewer session: 01a2131d-b181-7e73-bb92-174b182edb37
Slot: 2
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: high (H6)
  • Verdict: CHANGES
  • Reviewed head: efc50fc

Review report

VERDICT: CHANGES
Round: 1
Head: efc50fc
Slot: 2
CI: green
Session: 01a2131d-b181-7e73-bb92-174b182edb37
Reviewer: codex-cli 0.170.0; model: gpt-6.2-sol

Risk

high (H6: .github/workflows/documentation.yml adds artifact publication to the shared documentation deployment job, and README.md tells callers how to enable that publishing path. The owner must decide.)

Blocking findings

  • Blocking priorities: P2, P2

  • [P2] Two documentation jobs in one run target the same artifact (.github/workflows/documentation.yml:131). A caller with separate stable and LTS builds passed actionlint. The probe observed name="docs-artifact", overwrite=true for both calls and failed its uniqueness assertion. With those settings, a later upload can replace the earlier build's artifact. The caller has no input to select a distinct name. The hosted upload itself was outside the probe.

    Implementation fix. In .github/workflows/documentation.yml, add a string artifact-name input defaulting to docs-artifact, use it for the upload name, and remove overwrite: true so duplicate names surface as errors. Callers can then use stable labels for separate builds while preserving the documented single-build name. Update README.md with a two-job or matrix example using distinct names. Add a fixture to the workflow checks in test/runtests.jl that asserts the default name, forwarding of two distinct caller names, and absence of overwrite.

  • [P2] An opted-in build can finish without a downloadable artifact (.github/workflows/documentation.yml:132, README.md:313). In a fixture, the workflow's build command exited 0 and wrote docs/rendered/index.html, while the configured upload path docs/build was absent. The upload step leaves the action's missing-files policy at its warning default, so this configuration can yield a successful run with no artifact. The observed result is the missing upload source after a successful build. The warning and workflow result are inferred from the action configuration.

    Implementation fix. Set if-no-files-found: error on the upload step in .github/workflows/documentation.yml. Keep docs/build as the contract and state in README.md that opting in requires files at that path. Add a workflow regression test that checks the error policy, the false opt-in default, and the success-gated upload after the build. In an Actions fixture, assert that an enabled build with absent output fails at upload and one with docs/build/index.html produces an artifact containing that file.

Non-blocking findings

  • .github/workflows/documentation.yml:124 — Four added comment lines describe GitHub's implicit success guard and repeat the fork rationale in the input description and README. The diff counts four comment lines among 29 added nonblank lines. Implementation fix. Delete the four-line comment above uses:. The outcome assertions for the upload guard belong in the workflow regression test above.

What I ran

  • actionlint -color with actionlint 1.7.7 and ShellCheck 0.10.0 available. Exit 0 with no diagnostics in the checkout or the three-job caller fixture.
  • julia --version reported Julia 1.12.4. julia --color=yes test/runtests.jl passed 124 assertions across 21 testsets.
  • uv run --locked python --version reported Python 3.13.13. There is no Python project or lockfile and uv reported that --locked has no effect outside a project. uv run --locked python -m unittest discover -s test -p 'test_resolve_monorepo_tagbot.py' -v ran 9 tests and reported OK.
  • ruby probe.rb in the caller fixture passed the defaults, guard, step order, path and retention checks, then exited 1 with same-run upload names collide (1 distinct name for 2 enabled jobs).
  • julia --color=yes --project=docs/ docs/make.jl in the alternate-output fixture exited 0. The checks found docs/rendered/index.html present and docs/build absent.
  • git diff --check origin/master...HEAD exited 0. The checkout was clean.

What I did not verify

  • Hosted Actions artifact creation, replacement, missing-file handling, retention, and fork runtime credentials. The fixture probes exercised the workflow configuration and local build command.
  • CI's actionlint 1.7.12 container was unavailable locally. The CI status in the header was supplied with the review request.

AUTHOR_GRADE: {"task":"ci","score":3,"difficulty":2,"rounds":1,"author_harness":"unknown","author_model":"unknown","note":"Opt-in, retention and step order passed local probes. Two valid caller jobs select the same overwrite target, and a successful build can leave the upload source absent. The diff adds no regression coverage."}

Head link: efc50fc


🤖 Posted by an AI agent — harness: codex-cli 0.170.0 · model: gpt-6.2-sol
Conversation: local session 01a2131d-b181-7e73-bb92-174b182edb37 (no session URL)

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex desktop 0.171.0-alpha.13.2
Agent-Model: unknown (GPT-6 family)
Agent-Session: local session 01a22257-20a4-7960-91bd-006b2ea596b6 (no session URL)
@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

Added artifact-name so callers can give parallel documentation builds distinct names, removed overwrite, and set if-no-files-found: error. The README includes a matrix example and describes the docs/build requirement. These changes address the two configuration findings in the prior review.

Validation on the updated branch:

  • julia +1.12 --compiled-modules=existing --startup-file=no --color=no test/runtests.jl exited 0: 135 assertions passed.
  • The new 11-assertion workflow-contract test was run against both configurations. The prior workflow exited 1 with 6 passes and 5 failures; the updated workflow exited 0 with 11 passes. The test also passed with the Windows shell change from Fix Bash shell selection in Windows reusable workflows #142 applied.
  • Runic 1.9.0, actionlint 1.7.12 with ShellCheck, typos, git diff --check, and the nine Python resolver tests passed.
  • GROUP=QA and a docs build do not apply: this repository has no root Julia package project or docs build script. The reusable workflow has not been exercised end-to-end on GitHub Actions; the tests inspect its configuration, not an actual upload or missing-file failure on a hosted runner. This remains open for verification.

The added commit is a4e3532. New-head CI is pending.


🤖 Posted by an AI agent — harness: Codex desktop 0.171.0-alpha.13.2 · model: GPT-6 (exact model ID unknown)
Conversation: local session 01a22257-20a4-7960-91bd-006b2ea596b6 (no session URL)

@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

I exercised the actual reusable workflow at commit a4e3532 in a temporary caller workflow: https://github.com/SciML/.github/actions/runs/46151058773. Its overall conclusion is failure by design because the missing-output case is expected to fail.

  • The Julia 1 and 1.11 calls both succeeded and uploaded separately named docs-1 and docs-1.11 artifacts. The verification job downloaded both and checked each index.html.
  • The Julia 1.10 case generated no output and the upload step failed with No files were found with the provided path: docs/build.

The fixture workflow and package are at 4210b5c. This verifies the success and missing-output paths for this head, but does not test all caller configurations.


🤖 Posted by an AI agent — harness: Codex desktop 0.171.0-alpha.13.2 · model: GPT-6 (exact model ID unknown)
Conversation: local session 01a22257-20a4-7960-91bd-006b2ea596b6 (no session URL)

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex desktop 0.171.0-alpha.13.2
Agent-Model: unknown (GPT-6 family)
Agent-Session: local session 01a22257-20a4-7960-91bd-006b2ea596b6 (no session URL)
@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

Merged current master into this branch without conflicts: 6145436. The combined tree passed 150/150 Julia assertions, including the 11 artifact-contract assertions; the nine Python resolver tests, Runic, actionlint with ShellCheck, typos, and the diff check also passed. Fresh GitHub Actions checks are running on the new head.


🤖 Posted by an AI agent — harness: Codex desktop 0.171.0-alpha.13.2 · model: GPT-6 (exact model ID unknown)
Conversation: local session 01a22257-20a4-7960-91bd-006b2ea596b6 (no session URL)

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #146

Reviewed head: 6145436
Raw SHA-256: cdcc3b2d505670d4f47ac4aaa86e9cbd28c66e90b6deaf4721cb7ccc0ceb2953
Source SHA-256: dc9ccfaf12d38dae58bc599499e174d57fa44aac3b83cf0fd0c21f7c59dcfc51
Source: standard-review-v1 (harness-log)
Reviewer session: 01a222f0-eec1-7a31-9a1b-bf59638969f3
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: high (H6)
  • Verdict: MERGE
  • Reviewed head: 6145436

Review report

VERDICT: MERGE
Round: 2
Head: 6145436
Slot: 1
CI: green
Session: 01a222f0-eec1-7a31-9a1b-bf59638969f3
Reviewer: codex-cli 0.172.0; model: gpt-6.2-sol

Risk

high (H6: .github/workflows/documentation.yml adds artifact publication to the shared docs deployment job, README.md instructs callers how to enable it, and test/runtests.jl exercises its configuration). An explicit owner decision is required.

Blocking findings

  • Blocking priorities: none

Non-blocking findings

  • test/runtests.jl:697 — The artifact contract test still passed all 11 assertions when I forced retention to one day and when I switched the step from uploading to downloading. Implementation fix — In the documentation artifact upload contract testset, assert that the upload step calls actions/upload-artifact and forwards inputs.artifact-retention-days. Assert that the workflow input is numeric with a default of 3. Both scratch mutations should then fail the test. The workflow and its README contract already agree.

What I ran

  • julia --startup-file=no --color=no test/runtests.jl with Julia 1.12.4 passed 150 assertions in 23 testsets, including 11/11 for the artifact contract.
  • A YAML probe resolved the README matrix to docs-1 and docs-lts at the reviewed head. The earlier workflow resolved both calls to docs-artifact with overwrite enabled. The reviewed configuration keeps the default name, omits overwrite, and sets the missing-files policy to error.
  • I ran the new Julia testset against scratch copies of the workflow. The earlier workflow failed. Restoring overwrite: true and removing if-no-files-found: error each failed the corresponding assertion. The checked-out workflow passed 11/11.
  • actionlint -color=false passed. The README matrix example also passed after I pointed its reusable-workflow reference at the checkout for local linting.
  • julia --startup-file=no -m Runic --check test/runtests.jl, typos on the three changed files, and git diff --check origin/master...HEAD passed.
  • uv run --locked python --version reported Python 3.13.13 and warned that --locked has no effect outside a project. uv run --locked python -m unittest discover -s test -p 'test_resolve_monorepo_tagbot.py' -v passed all 9 tests.
  • I compared the supplied delta with the local Git diff. The five paths outside the net PR diff matched origin/master. Both comparisons reported only modifications.

What I did not verify

  • Live GitHub artifact upload, matrix execution, fork token handling, and retention enforcement. The local results cover workflow configuration and the test suite. The CI status in the header came from the review request.

AUTHOR_GRADE: {"task":"ci","score":4,"difficulty":2,"rounds":2,"author_harness":"Codex desktop 0.171.0-alpha.13.2","author_model":"unknown (GPT-6 family)","note":"The new test passes on the reviewed workflow and catches restored overwrite and missing-output handling. It still passes when retention forwarding or the upload action changes."}

Head link: 6145436


🤖 Posted by an AI agent — harness: codex-cli 0.172.0 · model: gpt-6.2-sol
Conversation: local session 01a222f0-eec1-7a31-9a1b-bf59638969f3 (no session URL)

@ChrisRackauckas
ChrisRackauckas merged commit 8370baa into SciML:master Nov 30, 2026
3 checks passed
@isaacsas
isaacsas deleted the docs-upload-artifact branch November 30, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants