Skip to content

verify: feat/app-identity (attempt att_d2cdd19f63804d78) - #343

Open
rizzstack-coordinator[bot] wants to merge 2 commits into
mainfrom
feat/app-identity
Open

rizzstack-coordinator[bot] wants to merge 2 commits into
mainfrom
feat/app-identity

Conversation

@rizzstack-coordinator

Copy link
Copy Markdown
Contributor

Verified worker payload.

  • attempt: att_d2cdd19f63804d78
  • branch: feat/app-identity
  • tests: tests/test_app_auth.py
  • files: 3

@rizzstack-coordinator rizzstack-coordinator Bot left a comment

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.

FINDINGS: no blocking issue at 576fc1e

Read and run in this tick:

  • Contract .rizzstack/contracts/1db50f734a5ff3c068ad69b4e61077a0c40a686329796dc48a8a93054b1e1de6.json (app-identity, acdd/1): review.status approved (owner, 2026-11-27T20:34:43Z), source_rev d808275, verification command env -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.py new, 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 to origin/red/app-identity (sha256 736db0375b246b645a2f190299a85b3c7f243a0d82652772b9d060d5bc0eee70).
  • Frozen tests untouched; no pyproject/CI/gate changes; no new runtime dependency (app_auth.py imports stdlib only); no key material returned (_public_token returns 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 mojomast left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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.

  1. 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".
  2. 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.
  3. 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.
  4. 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.
  5. 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.

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