Skip to content

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

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

dinakarjs wants to merge 10 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: 813b3b01b9914a552ccff9c311106021388c59a1. 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: c2136b7118adbd0ecd6194e7fac54c952c470d2f.

  • 20 guard tests pass normally and 20 under optimized Python.
  • The actual changed-lock driver passes against current main; contribution whitespace checks pass.
  • The branch already contains current main and the fix(deps): enforce pyasn1 security floor for SDK and CI installs #303 dependency-floor repair. No new source commit was needed for this refresh.
  • Focused tooling validation only; no new full runtime-suite run is claimed. All returned current-head technical checks pass; the maintainer 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

@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 1a283a71a0bb3dbdf21eca064ca62773ee8fd973 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>
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor Author

@carloshvp addressed the rename finding at bf73805. 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 bf738052493595c208c908c2a57478b9cbce152f.

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 45edfb0. 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 45edfb0: Generated lock delta and all returned applicable technical workflows now succeed. Primary run: https://github.com/agentrust-io/ca2a/actions/runs/40918810475. 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 45edfb0ca0b4d0f6305120e237e933ead9bd276f.

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>
Upgrade only pyasn1 to 0.6.5 in the hash-locked development environment and retain the floor in dev.in. Other pins, extras and markers are unchanged.

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 151d29e9a28eae8feb1ab5e9d64b8c8f416e1f01. 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. Broader CI remains failed: the development lock installs pyasn1 0.6.4 and pip-audit stops the matrix; the focused repair is #303. Its review is requested, but it is not accepted/incorporated here. The full matrix must pass on the resulting port head after that dependency repair.

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>
Raise the pyasn1 floor for both optional SDK and development installs while keeping existing lock bytes unchanged. Built-wheel resolver controls reject 0.6.4 and accept 0.6.5 for each extra.

Prepared with OpenAI Codex.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>
Preserve both existing branch histories and the accepted upstream history already in agentrust-io#303. Combine its tested dependency floors and lock with the unchanged source-checker port for CI validation. Draft status, independent review and source-adoption gates remain required.

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 c2136b7118adbd0ecd6194e7fac54c952c470d2f.

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. The tested #303 history is now integrated on this draft branch: 849 SDK tests and the dependency audit pass locally, and the current hosted CI matrix succeeds. The previous pyasn1 audit failure is resolved on this head.

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.

@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 c2136b7118adbd0ecd6194e7fac54c952c470d2f.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@carloshvp The intermediate-directory symlink case is addressed in 813b3b01b9914a552ccff9c311106021388c59a1. The driver now checks each lexical path component before reading the lock. A real-Git regression rejects the deleted tracked lock when its parent is replaced with a symlink, and an ordinary-directory edit still passes. All 21 focused tests pass with and without Python optimization, and the current hosted lock-delta workflow passed. Could you re-review this commit? The PR is still a draft pending the repository’s adoption decision.

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.

3 participants