Skip to content

Every source file carries its copyright and licence in SPDX form - #181

Merged
rohanrkamath merged 2 commits into
mainfrom
quality/spdx-headers
Sep 13, 2026
Merged

rohanrkamath merged 2 commits into
mainfrom
quality/spdx-headers

Conversation

@arpanghoshal

Copy link
Copy Markdown
Member

What this changes

Two comment lines at the top of every .py and .sh under src/, tests/, fuzz/, scripts/, adapters/ and examples/: SPDX-FileCopyrightText: 2026 The CTRLRun contributors and SPDX-License-Identifier: Apache-2.0. A shebang stays on line one. No code changes; ruff format --check and ruff check are clean on the tree, and the examples suite passes.

Why: a file copied out of this tree on its own should say who holds it and under what licence, in the form tools read. This is the copyright_per_file and license_per_file pair of the OpenSSF Best Practices gold criteria.

Line numbers under src/ move by two. CLAIMS.md in CTRLRun/ctrlrun-docs cites them, so the docs job here is red until the matching pull request there merges (it shifts every citation and regenerates the API reference pages against this commit). Merge this first, then that one.

Checklist

  • Specification first. No specification section: no behaviour changes, no public name changes.
  • Tests first. test_every_source_file_carries_its_copyright_and_license walks the six directories and fails on any file without the two lines.
  • Mutation table. Below.
  • CLAIMS.md. No README sentence changes; the citations shift in the paired docs pull request.
  • Docs audit green. Red by construction until the paired docs pull request merges (line numbers).
  • scripts/check.sh green for the parts a comment can touch: ruff format --check, ruff check, and the repository and examples suites.
  • Independent review not needed: comments only.
  • Nothing in src/ merges on green CI alone; a maintainer reads it.
  • Signed off.

Mutation table

Guard Test Result
the two lines removed from src/ctrlrun/errors.py test_every_source_file_carries_its_copyright_and_license red, names the file; restored, green

🤖 Generated with Claude Code

Two comment lines at the top of every .py and .sh under src/, tests/, fuzz/,
scripts/, adapters/ and examples/: the copyright holder (the contributors) and
the licence (Apache-2.0), in the SPDX form a tool can read. A shebang stays on
line one. LICENSE at the root is unchanged and still the licence text.

A file copied out of this tree on its own now says what it is. The test in
test_repository_signals.py walks the same six directories and fails on any
source file without the two lines, so the next file added carries them too.

The claims table in CTRLRun/ctrlrun-docs cites line numbers under src/, and
every one moves by two; the matching pull request there shifts them and
regenerates the API reference pages against this commit.

Signed-off-by: arpan <contact@arpanghoshal.com>
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 166 files, which is 66 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 2740f7f7-a6da-4869-8bed-dea75203b256

📥 Commits

Reviewing files that changed from the base of the PR and between a16db83 and 774ac4c.

📒 Files selected for processing (166)
  • adapters/langgraph/src/ctrlrun_langgraph/__init__.py
  • adapters/openai-agents/src/ctrlrun_openai_agents/__init__.py
  • examples/acs/main.py
  • examples/agent-race/main.py
  • examples/approval-mutation/main.py
  • examples/approval-replay/main.py
  • examples/authority-escalation/main.py
  • examples/cookbook/credential-rotation-agent/main.py
  • examples/cookbook/crm-update-agent/main.py
  • examples/cookbook/customer-notification-agent/main.py
  • examples/cookbook/data-deletion-agent/main.py
  • examples/cookbook/database-migration-agent/main.py
  • examples/cookbook/deploy-agent/main.py
  • examples/cookbook/iam-agent/main.py
  • examples/cookbook/manager-and-worker/main.py
  • examples/cookbook/observe-then-enforce/main.py
  • examples/cookbook/outbound-email-agent/main.py
  • examples/cookbook/payout-maker-checker/main.py
  • examples/cookbook/protect-an-mcp-server/main.py
  • examples/cookbook/receipts-to-opentelemetry/main.py
  • examples/cookbook/reconcile-against-the-remote/main.py
  • examples/cookbook/refund-agent/main.py
  • examples/cookbook/resolve-an-ambiguous-effect/main.py
  • examples/cookbook/slack-approvals/main.py
  • examples/cookbook/sqlite-to-postgres/main.py
  • examples/cookbook/verify-in-github-actions/run.sh
  • examples/double-refund/main.py
  • examples/medical_workbench.py
  • examples/without-an-agent/lost-merge/main.py
  • examples/without-an-agent/redelivered-webhook/main.py
  • examples/without-an-agent/retried-task/main.py
  • fuzz/fuzz_canonical.py
  • fuzz/fuzz_policy.py
  • fuzz/properties.py
  • scripts/check.sh
  • scripts/lock.sh
  • scripts/release_provenance.py
  • src/ctrlrun/__init__.py
  • src/ctrlrun/acs.py
  • src/ctrlrun/action.py
  • src/ctrlrun/adapter.py
  • src/ctrlrun/approval.py
  • src/ctrlrun/authority.py
  • src/ctrlrun/cli/__init__.py
  • src/ctrlrun/cli/demo.py
  • src/ctrlrun/cli/main.py
  • src/ctrlrun/conformance/__init__.py
  • src/ctrlrun/conformance/fixtures.py
  • src/ctrlrun/conformance/report.py
  • src/ctrlrun/conformance/store/__init__.py
  • src/ctrlrun/conformance/store/backends.py
  • src/ctrlrun/conformance/store/fixtures.py
  • src/ctrlrun/conformance/store/report.py
  • src/ctrlrun/conformance/store/suites.py
  • src/ctrlrun/conformance/store/worker.py
  • src/ctrlrun/conformance/suites.py
  • src/ctrlrun/control.py
  • src/ctrlrun/effect.py
  • src/ctrlrun/errors.py
  • src/ctrlrun/gateway/__init__.py
  • src/ctrlrun/gateway/legacy.py
  • src/ctrlrun/gateway/mcp.py
  • src/ctrlrun/gateway/operator.py
  • src/ctrlrun/gateway/outcome.py
  • src/ctrlrun/gateway/server.py
  • src/ctrlrun/gateway/transport.py
  • src/ctrlrun/gateway/wire.py
  • src/ctrlrun/identity.py
  • src/ctrlrun/jwt_identity.py
  • src/ctrlrun/migrations.py
  • src/ctrlrun/otel.py
  • src/ctrlrun/policy.py
  • src/ctrlrun/postgres.py
  • src/ctrlrun/receipt.py
  • src/ctrlrun/reporting.py
  • src/ctrlrun/revocation.py
  • src/ctrlrun/scan.py
  • src/ctrlrun/state.py
  • src/ctrlrun/transport.py
  • src/ctrlrun/upstream.py
  • src/ctrlrun/verify/__init__.py
  • src/ctrlrun/verify/guarantees.py
  • src/ctrlrun/verify/report.py
  • src/ctrlrun/verify/scenarios.py
  • src/ctrlrun/verify/worker.py
  • src/ctrlrun/webhook.py
  • tests/conftest.py
  • tests/failure_injection.py
  • tests/test_acs.py
  • tests/test_action.py
  • tests/test_adapter.py
  • tests/test_adapters_langgraph.py
  • tests/test_adapters_openai_agents.py
  • tests/test_approval.py
  • tests/test_approver.py
  • tests/test_attempt_cap.py
  • tests/test_attempt_integrity.py
  • tests/test_authority.py
  • tests/test_break_glass.py
  • tests/test_budget_document.py
  • tests/test_budget_holds.py
  • tests/test_cli_store.py
  • tests/test_clock_skew.py
  • tests/test_concurrency.py
  • tests/test_conformance.py
  • tests/test_cookbook.py
  • tests/test_cross_host.py
  • tests/test_decision_order.py
  • tests/test_delegation.py
  • tests/test_demo.py
  • tests/test_effect.py
  • tests/test_elicitation.py
  • tests/test_entitlement.py
  • tests/test_examples.py
  • tests/test_framework_probe.py
  • tests/test_fuzzing.py
  • tests/test_gateway.py
  • tests/test_gateway_server.py
  • tests/test_gateway_transport.py
  • tests/test_hop.py
  • tests/test_hop_surfaces.py
  • tests/test_idempotency.py
  • tests/test_identity.py
  • tests/test_inspect.py
  • tests/test_jwt_identity.py
  • tests/test_ledger.py
  • tests/test_m_of_n.py
  • tests/test_mcp.py
  • tests/test_mcp_operator.py
  • tests/test_migrations.py
  • tests/test_observe.py
  • tests/test_operator_surfaces.py
  • tests/test_otel.py
  • tests/test_outcome.py
  • tests/test_packaging.py
  • tests/test_policy.py
  • tests/test_policy_change.py
  • tests/test_policy_versioning.py
  • tests/test_postgres.py
  • tests/test_preconditions.py
  • tests/test_protect.py
  • tests/test_readme_assets.py
  • tests/test_receipt_chain.py
  • tests/test_reconcile.py
  • tests/test_recovery.py
  • tests/test_release_v0_6.py
  • tests/test_reporting.py
  • tests/test_repository_signals.py
  • tests/test_resume.py
  • tests/test_revocation_feed.py
  • tests/test_revoke_selector.py
  • tests/test_scan.py
  • tests/test_schema_completeness.py
  • tests/test_scope_provider.py
  • tests/test_sector_configuration.py
  • tests/test_sinks.py
  • tests/test_soak.py
  • tests/test_store_conformance.py
  • tests/test_task_binding.py
  • tests/test_transport.py
  • tests/test_upstream_pinning.py
  • tests/test_verify.py
  • tests/test_verify_action.py
  • tests/test_verify_authority.py
  • tests/test_verify_report.py
  • tests/test_webhook.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rohanrkamath
rohanrkamath merged commit fd2bce1 into main Sep 13, 2026
13 of 14 checks passed
@rohanrkamath
rohanrkamath deleted the quality/spdx-headers branch September 13, 2026 20:32
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.

2 participants