Repository navigation
docs(reserved-oxide-symbols): document all ten symbol constants - #738
Merged
nihalpasham merged 1 commit intoAug 10, 2026
Merged
Conversation
When naming-guard rejects a hardcoded prefix literal it says "See its README for the layered API". That README listed four of the ten symbol constants the crate exports -- the same ten the guard's alternation is built to cover -- so the guard could block a hardcoded `cuda_oxide_artifact_anchor_246e25db_` and point at a page that never names the constant to use instead. The six that were missing are CONSTANT_PREFIX, KERNEL_SCOPE_LOCAL, ARTIFACT_ANCHOR_PREFIX, PTX_MERGE_REQUIRED_PREFIX, and the two legacy forms. NVIDIA#645 was this same shape on the enforcement side; this is its documentation half. The table now also says what each prefix names, so the right one is pickable without reading lib.rs, and records that KERNEL_PREFIX contains LEGACY_KERNEL_PREFIX as a substring: the modern name is the legacy one behind a `cuda_oxide_codegen_v1_` scope, so `starts_with` separates them but `contains` reports every modern kernel as legacy. That is precisely the substring matching the Layer-3 predicates exist to hide, and the README already promises they do. Values checked against lib.rs, not retyped. Closes NVIDIA#737 Signed-off-by: Vyncint Ng <[email protected]>
Collaborator
|
Checked all ten values against Merging; closes #737. |
nihalpasham
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #737.
When
naming-guardrejects a hardcoded prefix literal, it says:That README documented 4 of the 10 symbol constants the crate exports — the
same ten the guard's regex alternation is built to cover. So the guard could
block a hardcoded
cuda_oxide_artifact_anchor_246e25db_and send you to a pagethat never names the constant to replace it with.
Added:
CONSTANT_PREFIX,KERNEL_SCOPE_LOCAL,ARTIFACT_ANCHOR_PREFIX,PTX_MERGE_REQUIRED_PREFIX,LEGACY_KERNEL_PREFIX,LEGACY_DEVICE_PREFIX.#645 was this same shape on the enforcement side (the guard covered 6 of 10);
this is its documentation half.
Two things beyond a plain list
The table now says what each prefix names, so the right one is pickable
without reading
lib.rs.And it records a real trap:
KERNEL_PREFIXcontainsLEGACY_KERNEL_PREFIXasa substring, because the modern name is the legacy one behind a
cuda_oxide_codegen_v1_scope:So
containsreports every modern kernel as legacy. That is exactly thesubstring matching the crate's Layer-3 predicates exist to hide, and the README
already promises they do — it just never said why it mattered.
Verified
Both mechanically, against
lib.rsrather than by eye:pub constsymbol constant now appears in the README — nothing missingDocumentation only. No GPU needed.