-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add continuous live contract verification #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
| schedule: | ||
| - cron: "17 2 * * 1" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ci-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| verify: | ||
| name: Verify (${{ matrix.os }}) | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: oven-sh/setup-bun@v2 | ||
| - run: bun install --frozen-lockfile | ||
| - run: bun run typecheck | ||
| - run: bun test | ||
| - run: bun run build | ||
| - if: matrix.os == 'ubuntu-latest' | ||
| run: npm pack --dry-run |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Live contract canary | ||
|
|
||
| `gh2 doctor` runs the browser-cookie integrations without submitting any change. It executes only read operations and commands whose default behavior is a dry run, captures their output instead of printing settings data, and reports one status per GitHub surface. | ||
|
|
||
| ```bash | ||
| gh2 app login | ||
|
|
||
| gh2 doctor \ | ||
| --org example-org \ | ||
| --app example-app \ | ||
| --installation 12345 \ | ||
| --support \ | ||
| --pat-account example-user \ | ||
| --pat-owner example-org \ | ||
| --pat-repo example-repo \ | ||
| --output json | ||
| ``` | ||
|
|
||
| Exit `0` means every requested parser reached and understood the live page. Exit `2` means GitHub requires a refreshed browser session or sudo authentication; this is not reported as parser drift. Exit `1` means a form contract changed or another probe failed. | ||
|
|
||
| GitHub Actions cannot safely keep a browser session with periodic sudo authentication, so schedule this command on a trusted local machine rather than storing GitHub cookies in repository secrets. Run `gh2 app login` again when the canary reports `reauth_required`, then rerun the same doctor command to distinguish an authentication gate from markup drift. | ||
|
|
||
| On macOS, use `launchd` with the absolute Homebrew `gh2` path and write stdout and stderr to a local state directory. Keep the job read-only and point it at a dedicated test App when App settings are included. |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: The installer exits whenever the package is installed from a Git checkout or while
CIis set, even whenbin/native/gh2is missing. The launcher then imports this installer and immediately attempts to spawn that nonexistent binary, sogh2fails to start for source-checkout installations and normal CI-installed packages. Only skip release downloads when a source-mode launcher is actually available, or makebin/gh2fall back to the source entry point. [logic error]Severity Level: Major⚠️
- ⚠️ Normal non-CI registry installs remain unaffected.(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖