Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/bridge-maintenance-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- fix/bridge-033-status-refresh
- fix/desktop-widget-column-fit

permissions:
contents: read
Expand All @@ -25,6 +26,15 @@ jobs:
run: find wordpress-plugins/calorieapp-identity-bridge -name '*.php' -type f -print0 | xargs -0 -n1 php -l
- name: Exercise WordPress page rendering
run: php tools/tests/wordpress_site_session_markup.test.php
- name: Preserve non-page responses while correcting donation footers
run: php tools/tests/wordpress_legal_footer_post.test.php
- name: Return successful donation forms to a reloadable page
run: php tools/tests/wordpress_donation_return.test.php
- name: Check the CalorieApp footer and public market data
run: |
php tools/tests/wordpress_page_ending.test.php
node --test tools/tests/wordpress_page_ending.test.mjs
node --test tools/tests/wordpress_embed_loading.test.mjs
- name: Exercise the preserved login and site-wide session controls
run: node --test tools/tests/calorieapp_embed_readiness.test.mjs tools/tests/wordpress_site_session.test.mjs
- name: Check responsive header correction lifecycle
Expand Down
54 changes: 54 additions & 0 deletions contracts/ecosystem/xrpl-dex-assets.v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"schema_version": 1,
"network": "xrpl-mainnet",
"status": "design-only",
"assets": {
"XRP": {
"kind": "native",
"currency": "XRP"
},
"CAL": {
"kind": "issued",
"currency": "43616C6F72696500000000000000000000000000",
"display_code": "CAL",
"issuer": "rNqGa93B8ewQP9mUwpwqA19SApbf62U7PY"
},
"RLUSD": {
"kind": "issued",
"currency": "524C555344000000000000000000000000000000",
"display_code": "RLUSD",
"issuer": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De"
}
},
"pairs": [
{
"id": "CAL_XRP",
"base": "CAL",
"quote": "XRP",
"directions": ["buy_cal", "sell_cal"],
"amm_account": "rhDx4NgeWz6jzs4TwiwYDmpeF2maJFZBtr",
"verification": "validated-ledger"
},
{
"id": "CAL_RLUSD",
"base": "CAL",
"quote": "RLUSD",
"directions": ["buy_cal", "sell_cal"],
"amm_account": "rPN26geWz6jzs4TwiwYDmpeF2maJFZBtr",
"verification": "validated-ledger"
},
{
"id": "XRP_RLUSD",
"base": "XRP",
"quote": "RLUSD",
"directions": ["both"],
"routing_only": true,
"verification": "asset-identities-only"
}
],
"excluded_labels_pending_issuer_review": [
"CAL/EUR",
"CAL/USD",
"BTC/CAL"
]
}
32 changes: 32 additions & 0 deletions contracts/identity-bridge/v1/code-provenance.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,22 @@
"source_file": "calorieappdraft3.ai",
"adaptation": "Original phone-mark vector paths and colours retained; surrounding artboard and border omitted."
},
{
"path": "assets/calorieapp-page-ending.css",
"origin_class": "project-repository-material",
"repository_first_add_commit": "pending-current-change",
"declared_distribution_licence": "GPL-2.0-or-later",
"clearance_status": "contributor-source-and-similarity-review-pending",
"source": "CalorieToken/CalorieApp@4baea3acaeaa14dacc602ae8d6154ab4c7e97836; footer and public XPMarket components only; session/layout controllers excluded"
},
{
"path": "assets/calorieapp-page-ending.js",
"origin_class": "project-repository-material",
"repository_first_add_commit": "pending-current-change",
"declared_distribution_licence": "GPL-2.0-or-later",
"clearance_status": "contributor-source-and-similarity-review-pending",
"source": "CalorieToken/CalorieApp@4baea3acaeaa14dacc602ae8d6154ab4c7e97836; footer and public XPMarket components only; session/layout controllers excluded"
},
{
"path": "assets/calorieapp-site-layout.css",
"origin_class": "project-repository-material",
Expand Down Expand Up @@ -223,6 +239,22 @@
"declared_distribution_licence": "GPL-2.0-or-later",
"clearance_status": "contributor-and-source-declaration-pending"
},
{
"path": "includes/class-calorieapp-identity-bridge-market-widget.php",
"origin_class": "project-repository-material",
"repository_first_add_commit": "pending-current-change",
"declared_distribution_licence": "GPL-2.0-or-later",
"clearance_status": "contributor-source-and-similarity-review-pending",
"source": "CalorieToken/CalorieApp@4baea3acaeaa14dacc602ae8d6154ab4c7e97836; footer and public XPMarket components only; session/layout controllers excluded"
},
{
"path": "includes/class-calorieapp-identity-bridge-page-ending.php",
"origin_class": "project-repository-material",
"repository_first_add_commit": "pending-current-change",
"declared_distribution_licence": "GPL-2.0-or-later",
"clearance_status": "contributor-source-and-similarity-review-pending",
"source": "CalorieToken/CalorieApp@4baea3acaeaa14dacc602ae8d6154ab4c7e97836; footer and public XPMarket components only; session/layout controllers excluded"
},
{
"path": "includes/class-calorieapp-identity-bridge-rest.php",
"origin_class": "project-repository-material",
Expand Down
83 changes: 83 additions & 0 deletions docs/STEP_3_CYCLE_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Step 3 — first bundled implementation candidate

Candidate: Identity Bridge **0.3.27**, based on the uninstalled 0.3.26 work in
PR #133. Keep its base `fix/desktop-widget-column-fit` (#131), ultimately the
accepted maintenance line. Never merge that maintenance history into app main.
The user requested fewer cycles and plugin uploads after supplying 99 mobile
screenshots, including blog detail links and public usecase pages.

## Included website work

- Retain the prepared CAL market sizing, compact original shortcut artwork,
Down control on long pages and passive embedded-app startup cover from 0.3.26.
- Apply shared header rules to the public XUMM shortcode immediately, including
the narrow Richlist header; initialize a card inserted after DOM readiness once.
- Wrap Richlist tables for horizontal scrolling without changing any rows,
wallet addresses, sorting or destination links. The wrapper is keyboard reachable.
- Keep blog slider pagination in one horizontally scrollable row. All native
slider controls and the separate blog/article links remain available.
- Refine mobile open-price donation fields/buttons, cart table wrapping and
the checkout terms area's text size. Rules target the actual Brizy/WooCommerce
classes found in the public HTML and preserve the existing design language.
- Extend the existing footer-label correction to full product/cart HTML after
POST. Checkout, AJAX, REST, admin, JSON and fragment responses are excluded.
- Finish a successful open-price donation submission with a GET of the same
product. Existing redirects and the WooCommerce cart-redirect setting win.
Prices, quantities, notices, order state and gateway behavior remain owned
by WooCommerce and the installed donation/payment plugins.

## Evidence and limits

Public product HTML posts `wcj_open_price` to the donation product itself.
[WooCommerce 11.0.1's form handler](https://github.com/woocommerce/woocommerce/blob/11.0.1/plugins/woocommerce/includes/class-wc-form-handler.php)
invokes `woocommerce_add_to_cart_redirect` only after a successful add with no
error notices. Without an explicit URL or its optional cart redirect, it can
render the POST response directly. The narrow bridge callback supplies the
same-product GET destination at that success boundary. This addresses a known
resubmission path consistent with the screenshot's `ERR_CACHE_MISS`; it is not
an end-to-end proof of the user's particular browser history.

The public Xumm payment JavaScript file contained no cancellation handler.
No live checkout was submitted and no payment request was signed, declined or
cancelled in this work. The faded checkout on return therefore remains an
explicit live acceptance item, not a claimed gateway fix.

The header and layout changes are supported by screenshot and public HTML
inspection. Automated DOM fixtures are not browser rendering. Browser tab
listing failed before inspection, so mobile/desktop appearance remains pending.
The startup cover applies only to the embedded frontend; the separate top-level
Render startup page on the accepted login route remains outside this change.

## Separate CalorieApp update

PR #132 against app main retains the prepared product-local portion controls
and CalorieApp wallpaper and adds a bounded food-search deadline correction.
The existing backend may spend 10 seconds on its primary request, 15 on its
fallback, plus queue time, while the old proxy stopped at 18 seconds and the
browser at 20. Search now has a 45-second proxy limit and 50-second browser limit.
Existing provider attempt/rate limits and every identity deadline are preserved.
There are no extra automatic search retries. The captured first failure has no
HTTP trace; the timing defect is demonstrated, its occurrence in that capture
is an inference. App deployment is separate from installing this ZIP.

## Focused acceptance after review

1. On a narrow phone, check Home, Richlist, one blog detail and one usecase:
header stays readable, menu is usable, table scrolls, dots do not fill rows,
CAL card is sized correctly and shortcut controls reach the expected place.
2. Enter a small donation, add it once, then use Back/Refresh from the resulting
page. Confirm the cart amount/quantity do not increase. Review checkout terms;
return after closing/declining an unsigned request and check checkout recovers.
Do not treat Close as proof of rejection or an unsigned request as payment.
3. After inactivity, search once for Magnum. Observe completion or a useful
bounded failure. Select a result near the top of a long list; its portion
controls and feedback should stay beside that same product.
4. Repeat the accepted joint login/logout once and check a representative
desktop width. Confirm the original page/browser and both sessions behave
as before.

The source, behavior and package gates run in the existing PR workflows.
Keep the current installed package available for rollback. This candidate does
not publish prepared page copy, translate content, merge PRs or deploy services.
The second cycle handles the full page/article/usecase content inventory and
remaining source-backed content/asset refinements.
87 changes: 87 additions & 0 deletions docs/STEP_3_DEX_SCOPE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Step 3 DEX scope and pair policy

Status: design and verified-asset registry prepared; production transaction
submission remains disabled pending legal scope and a separate security review.

## Initial pair set

The first-party selector may show only assets identified by both currency code
and issuer in `contracts/ecosystem/xrpl-dex-assets.v1.json`.

| Pair | User actions | Role |
| --- | --- | --- |
| CAL/XRP | Buy CAL and sell CAL | Primary market |
| CAL/RLUSD | Buy CAL and sell CAL | Primary market |
| XRP/RLUSD | Exchange in either direction | Routing/on-ramp bridge only |

The CAL/XRP and CAL/RLUSD AMMs were read from a validated XRPL mainnet ledger on
2026-09-08. The application must re-read validated ledger state for every quote;
the recorded pool accounts are identifiers, not a liquidity or price promise.

CAL/EUR, CAL/USD and BTC/CAL labels were observed in a third-party wallet view,
but are excluded until each issued asset's exact issuer, operator, redemption
claim and current pool state have been reviewed. A familiar ticker or icon is
not sufficient identification on XRPL.

## User flow

1. Choose **Buy CAL** or **Sell CAL** before choosing an amount.
2. Select XRP or RLUSD as the other asset.
3. If CAL is to be received, check for the exact CAL trustline and offer the
existing Xaman TrustSet flow when it is missing.
4. Request a fresh, validated-ledger quote. Show the route, expected amount,
minimum received or maximum spent, price impact, trading fee and network fee.
5. Stop when issuer identity, ledger freshness, liquidity or price-impact policy
fails. Never silently fall back to a same-ticker asset from another issuer.
6. Create a bounded transaction request and let the user review and sign it in
Xaman. The website never receives a seed or private key.
7. Report success only after the transaction is validated; otherwise show a
retry-safe failure state without automatic resubmission.

The initial implementation should use immediate-or-cancel behavior and must not
create resting orders. It must not trade automatically, custody assets, promise
execution, or charge an undisclosed routing fee.

## Liquidity and conflicts

Pool participation by a developer, operator, treasury or other project-related
wallet does not make a pool official and does not guarantee price stability,
redemption or continued liquidity. The public interface should use a general,
accurate disclosure:

> Liquidity may be supplied by project-related or affiliated wallets as well as
> independent participants. Availability, price and execution are not guaranteed.

Personal wallet addresses and individual balances are not part of the interface
by default. Any legally required conflict disclosure should identify the
relationship and material risk without unnecessarily publishing a natural
person's complete position history.

Project and personal liquidity activity should remain separately accounted for.
Do not generate artificial volume, coordinate trades to support a quoted price,
or market a displayed APR as expected return. Keep dated, reproducible ledger
snapshots for material project-wallet disclosures.

## Release gates

- Legal review classifies the proposed interaction under MiCA and confirms which
regions, disclosures and service relationships are permitted.
- Xaman/API terms are reviewed for transaction-signing use beyond authentication.
- Quote construction, issuer pinning, slippage bounds, idempotency and validated
result handling receive tests and independent security review.
- Mobile buy and sell paths are tested with a dedicated low-value test wallet.
- Production thresholds are configured centrally and fail closed; they are not
inferred from a screenshot or hard-coded marketing figures.

Until all gates pass, the website may explain the verified pairs and link to an
external market, but must not present its own live mainnet trade button.

## Regulatory references

- ESMA MiCA Article 3 definitions: <https://www.esma.europa.eu/publications-and-data/interactive-single-rulebook/mica/article-3-definitions>
- ESMA MiCA Article 59 authorisation: <https://www.esma.europa.eu/publications-and-data/interactive-single-rulebook/mica/article-59-authorisation>
- ESMA MiCA Article 7 marketing communications: <https://www.esma.europa.eu/publications-and-data/interactive-single-rulebook/mica/article-7-marketing-communications>
- AFM crypto-party supervision: <https://www.afm.nl/nl-nl/sector/cryptopartijen/toezicht>
- XRPL decentralized exchange: <https://xrpl.org/docs/concepts/tokens/decentralized-exchange>
- Ripple RLUSD token addresses: <https://docs.ripple.com/products/stablecoin/overview/token-addresses>
- Xaman regional XRP buying options: <https://help.xaman.app/app/getting-started-with-xaman/buying-xrp>
37 changes: 37 additions & 0 deletions docs/STEP_3_PRESENTATION_RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Step 3 presentation release

Candidate: Identity Bridge 0.3.30.

## Included presentation changes

- Existing Brizy footers remain stored in place. Singular pages missing a CAL
market card receive one candidate which is deduplicated against an existing
XPMarket/legacy card and positioned before the existing legal footer.
- The Trustline page reuses the installed XUMM Login plugin's existing Xaman
TrustSet route. No Xaman credential or signing implementation is duplicated.
- The Richlist highlights only the row already marked for the authenticated
visitor and adds an accessible jump control. Logged-out visitors receive no
inferred position.
- Contact, donation and Complianz consent controls receive scoped responsive
presentation without changing their submission or consent behavior.
- How to buy becomes a wallet, regional XRP funding, CAL trustline, then buy or
sell path. Unreliable generic DEX links are removed. The issuer-pinned XPMarket
destination remains, and CAL/XRP plus CAL/RLUSD are identified as validated
XRPL AMMs. First-party mainnet signing stays labelled release-gated.

The display changes are reversible by disabling the companion plugin. They do
not mutate stored Brizy content, create a DEX transaction, publish personal
wallet ownership, or merge the application branch.

## Third-party mark added in 0.3.28+

`assets/calorieapp-site-polish.js` contains the monochrome X logo path from X's
official brand toolkit solely to identify CalorieToken's X profile. The mark is
not project-owned and is not licensed under the plugin's software licence.

- Source: <https://about.x.com/en/who-we-are/brand-toolkit>
- Asset: <https://about.x.com/content/dam/about-twitter/x/brand-toolkit/x-logo.zip>
- Retrieved: 2026-09-08

The original vector geometry is preserved; `currentColor` retains the site's
monochrome icon colour.
Loading
Loading