Skip to content

test(ci): propose generated-lock delta checks - #394

Draft
dinakarjs wants to merge 8 commits into
agentrust-io:mainfrom
dinakarjs:test/generated-lock-delta-20261026
Draft

dinakarjs wants to merge 8 commits into
agentrust-io:mainfrom
dinakarjs:test/generated-lock-delta-20261026

Conversation

@dinakarjs

@dinakarjs dinakarjs commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Intermediate-parent symlink repair — 5 November 2026

Current head: 979441dba0bf4fca2b11f611561a8c46892facd1. The changed-lock driver now checks every lexical path component before reading a lock. The real-Git regression replaces a tracked nested lock directory with a symlink and confirms the deleted lock is refused; an ordinary-directory edit remains accepted. Both subprocess modes are exercised.

Validation: 21 focused tooling tests pass normally and 21 under optimized Python in each port. Before the repair, the new negative control fails in both modes with PASS requirements/nested/dev.txt; the ordinary control passes. Whitespace checks pass. No runtime SDK code changed and no fresh full SDK suite is claimed. The standalone source checker is unchanged. Current-head hosted results and independent re-review remain separate. Draft and repository-specific adoption holds remain. Prepared with OpenAI Codex; DCO-signed.


Problem and change

Generated-lock changes can silently remove dependencies, replace hashes or lose the prior baseline through a rename. This proposed CI guard compares generated locks with the PR base, preserves quoted marker whitespace and lexical paths, and refuses symlink/non-regular lock paths. The driver discovers additions/deletions with rename detection disabled; repository-specific exclusions remain explicit.

The checker is byte-identical to WCM #249 at a5e523f54a8ac08e8c7adb8503de2a5c37a5f43f (blob 0b0961ce302e840daee13dc218695a463a4a1393). Rajnish and drk-ram have approved that source head. Each port still needs independent repository adoption/review; this is not an organization-wide policy mandate.

Validation — 3 November 2026

Head: 6573426f996779d0dc88e6cc125e80eb7566c078.

  • 20 guard tests pass normally and 20 under optimized Python.
  • The actual changed-lock driver passes against current main; contribution whitespace checks pass.
  • Current main is merged with both histories and DCO sign-off preserved. The published tree exactly matches the locally checked tree; checker/driver/tests are unchanged.
  • Focused tooling validation only; no new full runtime-suite run is claimed. All returned current-head technical check runs pass; the review gate remains failed.

Review and adoption

@carloshvp: current-head re-review and the repository-specific adoption disposition remain requested. Earlier approvals were for superseded port revisions. A new formal reviewer request was attempted on 3 November but the connector returned HTTP 403; no successful reassignment is claimed. Draft retained until that disposition and normal merge gates are satisfied.

Prepared with OpenAI Codex; DCO-signed. No merge, release or change to repository protections.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Contributor Check: MEDIUM

Check Result
Profile MEDIUM
Credential LOW
Overall MEDIUM

Automated check by AgenTrust Contributor Check.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor check flagged MEDIUM risk label Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

The new Generated lock delta, workflow lint and integration validation jobs pass. Remaining examples/links failures are the existing repository issues tracked by #362 and #357. This port remains draft while the source WCM #249 checker and this repository-specific scope receive independent review.

@carloshvp carloshvp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed exact head 9bb270150bc894d4632e22b5182ff50f32fd142f in an isolated checkout. Requesting one correction to the generated-lock driver before adoption.

The five committed unittest methods pass. An independent temporary-Git regression renames requirements/dev.txt to requirements/renamed.txt while dropping one of ten exact, hash-pinned dependencies. Git reports R090; the actual driver exits 0 and prints NEW requirements/renamed.txt: structure only; no prior dependency baseline. This reproduces both normally and under python -O.

git diff --name-only applies rename detection and emits only the destination. The old lock never reaches the deleted-lock guard, and the new pathname bypasses comparison with its predecessor, so both deletion and dependency loss escape the advertised review requirement. Please enumerate additions/deletions with rename detection disabled, or explicitly handle rename source/destination pairs and compare their dependency identities. Add a real-Git rename-plus-removal regression alongside the existing deletion and upgrade controls.

This is a defect in the proposed CI guard, not evidence of an installed dependency or production security bypass. The source WCM checker review and this draft's repository-specific acceptance remain separate.

Reviewed with OpenAI Codex.

Prepared with OpenAI Codex.

Signed-off-by: Srinivasa Consultants <78673153+dinakarjs@users.noreply.github.com>

Copy link
Copy Markdown
Contributor Author

@carloshvp addressed the rename finding at ed8d9ff. The driver now passes --no-renames to git diff so the deleted source lock reaches the existing explicit-review guard, even when Git would classify the change as R090/R100. A real temporary-Git regression verifies rename classification and checks both unchanged renames and rename-plus-dependency-removal, normally and under python -O. All four controls fail on the old driver; all six unittest methods pass with the repair, including existing upgrade/deletion controls. Syntax/pyflakes lint and whitespace pass. The documentation makes the conservative rename policy explicit. No dependency pins or runtime behavior changed. Please re-review; draft and independent acceptance gates remain. Prepared with OpenAI Codex.

@carloshvp carloshvp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed current head ed8d9ffb7584f52d667937cd093118b68dbc6034.

The --no-renames repair closes the previously reproduced rename/dependency-removal bypass. In an isolated checkout, all six unittest methods pass normally and under python -O; removing only --no-renames makes all four rename controls fail. DCO trailers are present where required.

One remaining CI gap needs fixing: the workflow selects only test_lock_delta.py, so the new test_lock_renames.py regression never runs in the advertised guard job. Its path is also absent from the trigger filter. Use a discovery pattern and path filter that include both test modules, and run that workflow command normally and under -O. Keep the PR draft until its separate acceptance requirements are satisfied. Existing repository checks and independent acceptance remain separate.

Prepared with OpenAI Codex.

Comment thread .github/workflows/lock-delta.yml Resolved
Include rename controls in discovery and path filters; exercise normal and optimized interpreters.

Prepared with OpenAI Codex.

Signed-off-by: Srinivasa Consultants <78673153+dinakarjs@users.noreply.github.com>

Copy link
Copy Markdown
Contributor Author

@carloshvp addressed the CI discovery gap at 40d52e2. The workflow and path filter both use test_lock_*.py, which includes the delta and rename modules; its regression step runs in normal and optimized (-O) modes. Both exact commands pass six unittest methods locally on Linux/Python 3.12.14, and whitespace checks pass. The published tree is the tested parent tree plus only this workflow edit. Draft retained pending independent source-checker/port acceptance and normal repository checks. Please re-review the updated head. Prepared with OpenAI Codex; DCO-signed.

Copy link
Copy Markdown
Contributor Author

Hosted validation follow-up at 40d52e2: Generated lock delta and all returned applicable technical workflows now succeed. Primary run: https://github.com/agentrust-io/integrations/actions/runs/40918596493. The CI discovery repair is now verified by the hosted guard job as well as the local normal/-O controls. Draft status and independent source-checker/port acceptance remain unchanged. No merge or publishing workflow was performed. Prepared with OpenAI Codex.

carloshvp
carloshvp previously approved these changes Oct 30, 2026

@carloshvp carloshvp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed current head 40d52e2301a7bcf3cd50e2bc33e25819e7a2045d.

The CI discovery and trigger filters now include both test_lock_delta.py and test_lock_renames.py, and the workflow runs the same discovery command normally and under -O. I independently ran both commands: all six unittest methods pass in each mode, including the real-Git rename/dependency-loss controls. The four ports contain identical checker/driver code; sign-offs and diff whitespace checks pass.

This resolves my previous CI-discovery change request. Approving this bounded port implementation; keep the draft status until the separate source-checker/adoption decision and repository acceptance requirements are satisfied. This review does not adopt a cross-project policy or approve WCM #249 on its behalf.

Reviewed with OpenAI Codex.

Validate the complete hash suffix. Add paired parser/CLI controls and
real-Git new-lock driver regressions normally and under optimized Python.

Prepared with OpenAI Codex.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>
Keep the shared checker identical to WCM agentrust-io#249 at 9fcf6bd. Preserve repository-specific changed-lock scope and exclusions; add hash-only and discovery regression controls.

Prepared with OpenAI Codex.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>

Copy link
Copy Markdown
Contributor Author

@carloshvp requesting re-review of the subsequent hash/inventory corrections at 746e0860eeec64d67de598bce18c71b8d20669d6. Your prior CI-discovery review applies to an older revision; this changed head still needs independent disposition.

I verified the current Git trees: tools/check_lock_delta.py is identical to WCM #249 source head 9fcf6bd6684dbd87473d1b0c670eaeb154749a75 (blob 4c702425da6ed1c554bcdcbd78245b2d9e9ee62d). The four ports also have identical driver, workflow and four regression-module blobs. Their repository exclusions remain separate.

The current-head guard job logs confirm that test_lock_*.py discovers 18 tests and passes in both normal and optimized Python, followed by successful execution of check_changed_locks.py against the PR base. This verifies the hosted discovery/execution path, not just a workflow-level green result. All other returned current-head technical workflows also succeed; the remaining returned failure is the independent maintainer/policy gate.

WCM #249 source acceptance has been requested explicitly from Imran/Rajnish and remains pending. Please review this port's updated implementation and identify remaining changes; keep draft/adoption holds until source acceptance and this repository's requirements are met. No new local suite run, source acceptance or merge is claimed by this status update. Prepared with OpenAI Codex.

Carry the WCM agentrust-io#249 source checker repair and refuse symlinks in the changed-lock driver. Add real-Git and marker-identity regressions. Keep draft adoption gates.

Prepared with OpenAI Codex.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>

Copy link
Copy Markdown
Contributor Author

@carloshvp requesting bounded re-review of current head f1f414a049ddbb0209cc3680536a1b50887b3b40.

The subsequent WCM #249 repair is carried here: quoted marker whitespace is preserved, lexical baselines are retained, and symlink lock paths are refused by the checker and changed-lock driver. Recorded local guard discovery passes 20 tests normally and under optimized Python. All returned current-head technical workflows pass.

Please review this updated port and identify any remaining correction. Draft status is retained pending independent acceptance of WCM #249 at a5e523f54a8ac08e8c7adb8503de2a5c37a5f43f and this repository's own acceptance. This request does not adopt a cross-project policy or imply that prior-head approval covers the new source. Validation details and scope are in the description; no new local rerun is claimed by this follow-up. Prepared with OpenAI Codex.

Preserve upstream history and the existing checker implementation.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>

@carloshvp carloshvp left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed commit 6573426f996779d0dc88e6cc125e80eb7566c078.

The current 20 regression tests pass normally and under -O, and the four ports carry identical checker/driver code. I found one remaining symlink bypass in the changed-lock driver.

In a real Git fixture, replace a tracked requirements/nested/dev.txt with a symlink requirements/nested -> ../elsewhere, with elsewhere/dev.txt containing the same pins. Git reports the original lock as deleted, but the driver returns exit 0 and PASS requirements/nested/dev.txt: changed packages []. It follows the intermediate symlink because it checks only the final path and the top-level requirements directory.

Check every lexical path component before reading, as check_lock_delta.py already does, or reject a deleted Git-tree entry before consulting the filesystem. Add a real-Git intermediate-directory symlink case with an ordinary-directory valid control in both normal and optimized modes. Keep the separate source-adoption/draft hold until the repaired source and this port are accepted.

continue
if relative in excluded:
print(f"OUT OF SCOPE {relative}: {excluded[relative]}")
continue

@carloshvp carloshvp Nov 3, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P2] Reject symlinked intermediate directories before reading a lock. Replacing requirements/nested/ with ../elsewhere makes a deleted tracked nested/dev.txt pass as an unchanged lock. path.is_symlink() and the top-level directory check miss that parent. Walk all lexical components (as the standalone checker does), and cover this deletion substitution with a real-Git regression.

Cover deleted tracked lock substitution and an ordinary-directory control
through real Git fixtures in normal and optimized Python.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review:MEDIUM Contributor check flagged MEDIUM risk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants