Skip to content

docs: add AMD copyright license header to external-facing docs - #65

Merged
rominf merged 9 commits into
mainfrom
add-amd-license-headers
Jun 30, 2026
Merged

docs: add AMD copyright license header to external-facing docs#65
rominf merged 9 commits into
mainfrom
add-amd-license-headers

Conversation

@juhovainio

@juhovainio juhovainio commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds AMD copyright license header to all Markdown files in the repository
  • Enforces Markdown license headers via hawkeye in CI

Files updated

README.md, AGENTS.md, MANIFEST.md, docs/atom.md, docs/automations.md, docs/ci-hardware-testing.md, docs/commit-signatures.md, docs/engine-plugins.md, docs/llm-tool-use.md, docs/manual-testing.md, docs/release-trust.md, docs/sglang.md, docs/testing.md, docs/ux-guidelines.md, docs/vllm.md, docs/wsl.md, skills/rocm-cli-assistant/SKILL.md

Markdown hawkeye integration notes

Hawkeye excludes *.md by default and has no built-in header type for Markdown, so two companion config files were added:

  • licenserc-md.toml — hawkeye config for Markdown, with a !**/*.md negation rule to override the default exclusion and a MARKDOWN_STYLE mapping for the .md extension
  • licenserc-md-header.toml — defines MARKDOWN_STYLE as an HTML comment block (<!-- ... -->) without extra blank lines, matching our existing header format

The CI license-headers job now runs hawkeye check --config licenserc-md.toml for Markdown.

@juhovainio
juhovainio force-pushed the add-amd-license-headers branch 2 times, most recently from 6d1aefd to 54b41a9 Compare June 29, 2026 14:10
@juhovainio
juhovainio requested a review from rominf June 30, 2026 09:49
@juhovainio
juhovainio enabled auto-merge June 30, 2026 10:24

@rominf rominf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes: fold Markdown into the single hawkeye config/check, and standardize the header wording repo-wide

Thanks for extending header enforcement to the docs — the goal is right. I'd like to land it as one config driving the existing single hawkeye check, rather than a second config plus a second CI step. Everything below is verified against hawkeye 6.5.1 (the version CI pins).

1. One config, one check

hawkeye applies a single inlineHeader across all file types and picks the comment style per extension, so source and Markdown can share one config and one hawkeye check. Fold the Markdown bits into licenserc.toml:

inlineHeader = """
Copyright © Advanced Micro Devices, Inc., or its affiliates.

SPDX-License-Identifier: MIT
"""

additionalHeaders = ["licenserc-md-header.toml"]

includes = [
  "**/*.rs",
  "**/*.py",
  "**/*.sh",
  "**/*.md",
]

excludes = [
  "!**/*.md",
  "target/**",
  ".claude/**",
  ".tmp-*/**",
  "third_party/**",
]

[mapping.MARKDOWN_STYLE]
extensions = ["md"]

Then:

  • delete licenserc-md.toml;
  • keep licenserc-md-header.toml (the custom <!-- --> style definition) — hawkeye rejects an inline [headerStyles] table (unknown field headerStyles), so the companion file is required and is pulled in via additionalHeaders;
  • drop the extra Check license headers (Markdown) CI step; the existing hawkeye check now covers everything.

The !**/*.md negation is still required — without it, **/*.md in includes is swallowed by hawkeye's default excludes and nothing gets checked.

2. Standardize the wording repo-wide

A single config has exactly one inlineHeader, and the Markdown wording here (Copyright © …, or its affiliates.) differs from the existing source wording (Copyright Advanced Micro Devices, Inc.). The decision is to adopt the © form everywhere, so re-apply it to the existing source headers:

hawkeye format

This rewrites the .rs/.py/.sh headers in place to match (verified: it replaces the old wording, and hawkeye check then passes for both source and Markdown). It does touch the existing source files — that is intended, so there is one canonical wording across the repo.

3. Heads-up: the directory excludes do not apply to Markdown

!**/*.md is a force-include and overrides the later target/**, .claude/**, .tmp-*/**, third_party/** excludes for .md files (confirmed in either order; even a more specific third_party/**/*.md cannot win against it). It is harmless today — there are no tracked .md files under those paths, and hawkeye's git integration skips untracked dirs — but the day a vendored third_party/*.md lands, CI would demand a copyright header on third-party content. Worth a comment in the config noting the limitation.

Minor

  • "third_party/**" lost its indentation in the licenserc-md.toml excludes list.
  • the companion-file comment says "without extra blank lines" but sets allowBlankLines = true.

Signed-off-by: Juho Vainio <juho.vainio@amd.com>
Signed-off-by: Juho Vainio <juho.vainio@amd.com>
Signed-off-by: Juho Vainio <juho.vainio@amd.com>
Signed-off-by: Juho Vainio <juho.vainio@amd.com>
Replace the grep-based Markdown header check with hawkeye, keeping all
header enforcement in one tool. Two new config files are needed because
hawkeye excludes *.md by default and has no built-in header type for it:

- licenserc-md.toml: hawkeye config for Markdown, using a negation rule
  (!**/*.md) to override the default exclusion and a custom MARKDOWN_STYLE
  mapping for the .md extension.
- licenserc-md-header.toml: defines MARKDOWN_STYLE as an HTML comment block
  (<!-- ... -->) without extra blank lines, matching our existing headers.

The CI step now runs `hawkeye check --config licenserc-md.toml` instead of
the 12-line git ls-files + grep loop.

Signed-off-by: Juho Vainio <juho.vainio@amd.com>
Signed-off-by: Juho Vainio <juho.vainio@amd.com>
The negation exclude rule (!**/*.md) in licenserc-md.toml overrides
any subsequent positive excludes for .md files, so .hawkeye-bin/**
in the excludes list had no effect. Adding .hawkeye-bin to .gitignore
is cleaner: hawkeye's git integration never enumerates those files.

Signed-off-by: Juho Vainio <juho.vainio@amd.com>
Merge licenserc-md.toml into licenserc.toml so one config and one
hawkeye check covers all file types. Remove the separate
"Check license headers (Markdown)" CI step.

The !**/*.md negation override, the MARKDOWN_STYLE mapping, and the
additionalHeaders reference are now all in licenserc.toml. Add a
comment explaining the force-include limitation: the negation cannot be
subsequently re-excluded for a subset of paths, so any tracked *.md
file under third_party/ would require a copyright header.

Signed-off-by: Juho Vainio <juho.vainio@amd.com>
Apply the © form and ", or its affiliates." suffix to all .rs, .py,
and .sh files, matching the wording already used in the Markdown
headers. Run with: hawkeye format

Signed-off-by: Juho Vainio <juho.vainio@amd.com>
@juhovainio
juhovainio force-pushed the add-amd-license-headers branch from 3afc613 to dd02821 Compare June 30, 2026 10:45

@juhovainio juhovainio left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All addressed — thanks for the thorough review.

  • One config, one check: merged licenserc-md.toml into licenserc.toml, deleted the separate file, dropped the second CI step.
  • Standardized wording: ran hawkeye format to rewrite all .rs/.py/.sh headers to the © form. Also picked up 9 new files added by the IA redesign (#62) that landed in main while this PR was in flight.
  • Negation limitation comment: added to licenserc.toml.
  • allowBlankLines comment: fixed in licenserc-md-header.toml.
  • Indentation: fixed.
  • Conflict: rebased onto main; the one conflict was tabs/overview.rs (deleted in #62, header-modified here) — resolved by accepting the deletion.

@rominf rominf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Thanks, Juho!

@rominf
rominf disabled auto-merge June 30, 2026 10:49
@rominf
rominf enabled auto-merge June 30, 2026 10:50
@rominf
rominf added this pull request to the merge queue Jun 30, 2026
Merged via the queue into main with commit 74ee17d Jun 30, 2026
9 checks passed
@rominf
rominf deleted the add-amd-license-headers branch June 30, 2026 11:22
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