Skip to content

docs(ci): add validator for 2026/working/ vs 2026/final/ entry-ID drift - #167

Open
drk-ram wants to merge 1 commit into
GenAI-Security-Project:mainfrom
drk-ram:docs/working-final-entry-drift-166
Open

drk-ram wants to merge 1 commit into
GenAI-Security-Project:mainfrom
drk-ram:docs/working-final-entry-drift-166

Conversation

@drk-ram

@drk-ram drk-ram commented Nov 4, 2026

Copy link
Copy Markdown

Summary

Companion to #166.

README.md says 2026/final/ is the canonical source for the published
2026 release and 2026/working/ is retained as historical working files,
but 2026/working/polling/scripts/sync_sprint2.py (#164) still actively
reads "existing entries" from 2026/working/. For 8 of 11 LLM00-LLM10
IDs, 2026/working/ and 2026/final/ assign the ID to two different risks
(see #166 for the full table and a read-only python -c reproduction), so
any tooling that trusts 2026/working/'s numbering silently attaches the
wrong topic to the wrong ID.

Changes

  • .github/scripts/check_working_final_entry_drift.py: maps each
    LLM##_*.md file's ID to its filename under both directories and flags
    any ID whose filename differs between them. It does not require the two
    trees to match outright -- the drift documented in [2026 errata] 2026/working/ and 2026/final/ disagree on which risk LLM03-LLM10 identifies (slug/numbering drift) #166 is a known,
    undecided condition, not something this PR resolves. Instead it pins the
    currently observed mismatched-ID set as KNOWN_DRIFT_IDS and fails only
    if the actual drift set changes (grows, shrinks, or shifts), so a
    future change to either directory's numbering has to consciously update
    the baseline (with a note on why) instead of silently shifting it
    further.
  • .github/scripts/test_check_working_final_entry_drift.py: covers
    matching trees, a single mismatched ID, IDs present on only one side,
    matching the known baseline, a newly drifted ID outside the baseline, and
    a previously tracked ID being resolved without updating the baseline, all
    against synthetic fixture trees built in isolated temporary directories.
  • .github/workflows/check-working-final-entry-drift.yml: runs the
    validator self-tests and then the validator itself on changes under
    2026/working/, 2026/final/, or either script.

No existing 2026/working/ or 2026/final/ content is modified.

Validation

From .github/scripts/ on Python 3.11.9:

README.md says 2026/final/ is the canonical source for the published 2026
release and 2026/working/ is retained as historical working files, but
2026/working/polling/scripts/sync_sprint2.py (GenAI-Security-Project#164) still actively reads
"existing entries" from 2026/working/. For 8 of 11 LLM00-LLM10 IDs,
2026/working/ and 2026/final/ assign the ID to two different risks (see
issue GenAI-Security-Project#166 for the full table and a read-only python -c reproduction), so
any tooling trusting 2026/working/'s numbering silently attaches the wrong
topic to the wrong ID.

Add .github/scripts/check_working_final_entry_drift.py: it maps each
LLM##_*.md file's ID to its filename under both directories and flags any
ID whose filename differs between them. Rather than requiring the trees to
match outright (the drift is a known, undecided condition, not something
this change resolves), it pins the currently observed mismatched-ID set as
KNOWN_DRIFT_IDS and fails only if the *actual* drift set changes, so a
future PR that touches either directory's numbering has to consciously
update the baseline instead of silently shifting it further.

test_check_working_final_entry_drift.py covers matching trees, a single
mismatched ID, IDs present on only one side, matching the known baseline,
a newly drifted ID outside the baseline, and a previously tracked ID being
resolved without updating the baseline, all against synthetic fixture
trees. A new workflow runs both the self-tests and the validator itself on
changes under 2026/working/, 2026/final/, or either script.

Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
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.

1 participant