Repository navigation
CI against the real learner-server through one throwaway test device per run - #7
Merged
Merged
Conversation
…e per run - prod-device (before the heavy lane): createTestDevice and seedMasteryGain with the CI minter's key (secret LEARNER_CI_MINT_KEY, scope ci-mint). The device's pairing code goes to a mode-600 file outside ci-out; only ids are printed. - prod-revoke (always runs, even after a failure or cancel): revokeTestDevice removes the device and everything it wrote. The device also dies at its 120-minute TTL. - The minter's key is in the env of these two steps only. Forks get no secrets, and the suite then skips by name. - ProductionServerTests (heavy, GitHub runner only): the app's own code pairs from the code (health and identity checked), heartbeats (pairing state ok), and is confined to itself: another device's endpoints are refused, and so are RPCs outside a test device's allowance. The mastery feed then announces exactly the seeded gain, and its feedback is recorded once (a replay returns the same row). The device key stays in memory and is never printed or an assertion operand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Blocker: a test device may call getBaselineStatus (the feed needs it), so the confinement check expected the wrong 403. It now checks getMasteryProgress, a read-only web RPC outside the allowance. - The device file is written right after createTestDevice, so prod-revoke finds the device even when seeding fails or the run is cancelled before the seed. - The feed test no longer depends on the heavy lane starting within 15 minutes of the seed: the feed's install time and cursor are set from the gain's completedAt. - A missing secret fails the run unless it is a fork's pull request. A device that was made while its suite skipped is a failure in the report, not a green skip. - Secrets stay out of failure output and process arguments: Pairing.Payload's description omits the key; ProdDevice's omits the code; ids are compared as plain strings; curl takes the key on stdin (-H @-); python takes replies on stdin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… is a warning (each speaking phase checks again) PR #7's run: the production lane passed end to end (device created, both suites green, revoked), but the speech phase failed: say stayed silent for its minute of retries right after corespeechd was killed, then worked in every later phase. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… outputs The review found nothing leaked and nothing real changed on production, and confirmed that revoke removes everything. Two production claims proved less than they said. - Nothing showed the app called production and not the runner's own local learner-server, which passes the same identity check. The device file now carries the API URL the device was created on; the test asserts the pinned URL equals it and prints the host. - The confinement that matters, that a test device cannot read the owner's mastery, was not tested: the feed's short lookback would hide the owner's gains anyway. A new test asks for every notification since 1970 and requires exactly this device's seed. Its messages report counts only, never rows. - The feedback check's comment now says what it tests: the server's idempotence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each run now also tests against the owner's production learner-server, through one throwaway test device. Nothing touches the owner's records.
What a run does:
prod-deviceuses the CI minter's key (secretLEARNER_CI_MINT_KEY, scopeci-mint) tocreateTestDeviceandseedMasteryGain. The pairing code goes to a mode-600 file outside the public logs, and only ids are printed.ProductionServerTests(heavy, GitHub runner only) checks:ok, and is confined (another device's endpoints and a web-only RPC are refused);prod-revokealways runs, even after a failure or cancel, and removes the device and everything it wrote. The device also dies at its 120-minute TTL.Secrets and coverage:
Review: an adversarial review before the first run found one blocker and four should-fixes. All are fixed in this PR. Auto-merge is off until the run's outputs are reviewed too.
🤖 Generated with Claude Code