Repository navigation
verify: feat/app-identity (attempt att_d2cdd19f63804d78) - #343
rizzstack-coordinator[bot] wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
FINDINGS: no blocking issue at 576fc1e
Read and run in this tick:
- Contract
.rizzstack/contracts/1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6.json(app-identity, acdd/1):review.statusapproved (owner, 2026-11-27T20:34:43Z),source_revd808275, verification commandenv -u PYTHONPATH python3 -m pytest -q -p no:cacheprovider tests/test_app_auth.py. - Verify record
verify-results/att_d2cdd19f63804d78.json: ok true, sha 576fc1e (equals this PR head), 5 tests / 0 failures. - Re-ran the contract command in a clean worktree at 576fc1e: 5 passed.
- True PR diff against merge-base 7b6d960: 4 files, +226/-0. Three are the leased files (
bundlebees_plugin/app_auth.pynew,settings.py+1 default,plugin.yaml+7 schema); the apply commit 576fc1e^..576fc1e touches only those three (+121). The fourth,tests/test_app_auth.py, is the approved RED fixture and is byte-identical toorigin/red/app-identity(sha256 736db0375b246b645a2f190299a85b3c7f243a0d82652772b9d060d5bc0eee70). - Frozen tests untouched; no pyproject/CI/gate changes; no new runtime dependency (
app_auth.pyimports stdlib only); no key material returned (_public_tokenreturns token + expires_at); the only external URL added is api.github.com; the key fixture is assembled at runtime; gitleaks SUCCESS. - CI at this head: 11/11 checks COMPLETED SUCCESS; mergeStateStatus CLEAN.
Structural note (not blocking): the branch is based on 7b6d960, three commits behind origin/main 20aa4ed (#341 contract/lease landing). git merge-tree is clean and the PR touches no .rizzstack/* path, so the merge does not revert the landed contracts or leases.
Approval at this exact head remains an owner/outside-reviewer action; this review records findings only.
mojomast
left a comment
There was a problem hiding this comment.
CHANGES REQUESTED (independent review — outside reviewer GROKCHAT, at owner Kyle's request: token-expiry and response handling fail open in app_auth.py) at 576fc1e
Read-only review. Nothing was run except hashing and git/gh reads.
- Head and CI: the head is 576fc1e. All 12 check runs completed with success: ci-gate, lease-tamper, owner-held, gitleaks, slop-lint, tests 1/4 to 4/4, orbit round trip, hermes plugins doctor, and rerun failed gate jobs. Every job ran on its first attempt. lease-tamper classed this PR as a T3 slice for contract app-identity and found that the one commit after the source rev stayed inside its 3 leased paths. There are no legacy commit statuses, which is why the combined status reads "pending".
- Contract: .rizzstack/contracts/1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6.json is on the base. Its canonical hash (review key removed, sort_keys, compact separators, ensure_ascii) is 1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6. That matches the filename and the lease's contract_sha256, and it starts with 1db50f73. The contract is approved.
- Frozen files: tests/test_app_auth.py has the same blob (009bbd77) at the head, at source_rev d808275 and on red/app-identity. Read-only bundlebees_plugin/cli.py is identical too. The contract names no vendored files. git diff d808275..head lists only the 3 assigned files, so conftest, vendor manifests, CI and gate files are unchanged.
- Scope: the PR changes 4 files: app_auth.py (new), settings.py (+1), plugin.yaml (+7), and the RED fixture commit itself. All are assigned or are the frozen test file. Nothing touches prohibited paths. There are no skip, xfail or conftest edits, and no tests were weakened or removed.
- Acceptance criteria: AC-001 met (app_auth.py:20-21). AC-002 met (58-86), but only because of the fallback described below. AC-003 met (24-37). AC-004 met (89-106). AC-005 met (109-113). There is no fallback to an owner token, PAT or environment variable. There is no logging, and the cache is keyed per (app_id, installation_id).
Required changes, all fixable without touching the frozen test:
- app_auth.py:40-51: if expires_at is missing or can't be parsed, raise AppAuthError. Right now the code assumes the token is valid for another hour and caches it.
- app_auth.py:80-85: check that the response has a non-empty string token and an expires_at, and raise AppAuthError if not. A missing key now raises a raw KeyError, and an empty token gets cached and returned.
- app_auth.py:73: check that installation_id is a positive integer before it goes into the URL.
For the owner, not blocking for this worker:
- The frozen AC-002 fixture's expires_at is earlier than the test's NOW, so passing the test requires treating an already-expired token as valid for an hour (app_auth.py:51). Fixing that means editing the test and re-freezing the contract.
- reviewer_key_path only requires poster_user to be non-empty. The contract summary says the key is exposed only to the poster user, but the code checks neither the OS user nor the file owner.
- token_for reads the key and throws it away. The injected signer never gets the key, so nothing ties signing to the permission-checked file.
- Nothing calls app_auth yet. A separate reviewer-key read in acdd_cli.py (out of scope here) has no permission check.
Verified worker payload.
att_d2cdd19f63804d78feat/app-identity