Repository navigation
Add the offline HERESY API Calculator and GitHub Pages deployment - #3
Conversation
There was a problem hiding this comment.
Sorry @EmergentMonk, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 3 days and 17 hours by commenting @sourcery-ai review. Upgrade to get a review now.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer's GuideThis PR adds a plain HTML/CSS/JavaScript HERESY calculator whose deterministic protocol core runs offline from local disk, renders eleven deliberately ceremonial API styles with exact arithmetic and payload metrics, is covered by Python and Node regression tests, and is deployed unchanged from web/ through GitHub Pages. Sequence diagram for offline calculator evaluationsequenceDiagram
actor User
participant Browser as Browser UI
participant App as app.js
participant Core as heresy-core.js
User->>Browser: Enter operands, operation, and interface style
Browser->>App: submit or change event
App->>Core: evaluate(leftValue, rightValue, operationSlug, styleSlug)
Core->>Core: parseInt32(value, label)
Core->>Core: exactResult(left, right, operation)
Core->>Core: buildPayload(styleSlug, operation, left, right, intent)
Core-->>App: report with result, payload, metrics, and caveats
App->>Browser: render(report)
Flow diagram for protocol-style evaluation and metricsflowchart TD
Start["User selects operands, operation, and style"] --> Validate["parseInt32 and validate operation/style"]
Validate --> Result["exactResult"]
Result --> Payload["buildPayload for selected exhibit"]
Payload --> Metrics["Calculate payload bytes, ceremony bytes, tokens, and Ceremony Ratio"]
Metrics --> Auth{Authenticated style?}
Auth -->|Yes| Tragedy["Report lost key and 401"]
Auth -->|No| Local["Report no authentication required"]
Tragedy --> Report["Render result and curatorial explanation"]
Local --> Report
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0da711b14
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex please review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f647c742c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Implements PR #3 — HERESY API CALCULATOR from
ROADMAP.md.HERESY-API now has an offline-first browser exhibit that can perform tiny arithmetic while routing the same intent through a deliberately disproportionate historical or modern interface style. The exact static files that work from local disk are also what GitHub Pages publishes.
Static app contract
The app lives entirely under
web/and uses:Opening
web/index.htmldirectly from disk is a supported runtime mode.Calculator interaction
The user chooses:
The result surface reports:
ADD 2 2ceil(bytes / 4))The Dave protocol
REST, GraphQL, and agent-tool modes retain the synthetic credential tragedy:
The emitted fake request uses
LOST-IN-.env.old.backup.final2; the app itself has no credential and no network dependency.GitHub Pages
Adds
.github/workflows/pages.ymlusing the standard Pages artifact/deployment flow.The deployment uploads only
web/. There is no build transform, dependency installation, or server runtime. GitHub Pages is a distribution surface for the same files that work locally.Validation
Existing Python Time Machine tests remain in the lean CI lane. PR #3 adds:
Files of interest
web/index.html— offline entrypointweb/style.css— responsive industrial museum UIweb/heresy-core.js— deterministic calculator and fake protocol engineweb/app.js— DOM adaptertests/web_smoke.js— executable core regressionstests/test_web.py— offline/static invariants.github/workflows/pages.yml— static Pages deploymentCuratorial rule preserved
The app does not claim the old mechanisms are universally superior. Each exhibit still has to explain what its ceremony buys and what the comparison omits.
The only universal conclusion is that Dave should not be responsible for the API key.
Summary by Sourcery
Add a dependency-free offline HERESY API calculator and publish the same static application through GitHub Pages.
New Features:
Bug Fixes:
Enhancements:
CI:
Deployment:
Documentation:
Tests:
Chores: