TWO-24748/feat: Brand-code plumbing and test target for the dev harness#33
Open
dgjlindsay wants to merge 7 commits into
Open
TWO-24748/feat: Brand-code plumbing and test target for the dev harness#33dgjlindsay wants to merge 7 commits into
dgjlindsay wants to merge 7 commits into
Conversation
The ticket's 'no Makefile or Docker setup' premise predates the
harness — Makefile (install/configure/run/debug/stop/flush/clean/
proxy/logs), compose stack, dev/configure.php and .env.local.example
all exist. The actual delta:
- TWO_BRAND_CODE env var plumbed through .env.local.example, the
configure target and dev/configure.php, writing the
PS_TWO_BRAND_CODE configuration value the brand loader (TWO-24746)
resolves to brands/{code}.php. Added to the dedup key list.
- make test: runs the tests/run.php harness in a php:8.2 container —
the same suite CI runs. The ticket's 'establish PHPUnit baseline'
is superseded by that harness (phpunit.xml.dist remains as a stub
for a future PHPUnit adoption; the harness is deliberately
dependency-free).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
- The brands/two.php header now states PS_TWO_BRAND_CODE is the PRODUCTION selection mechanism and cross-references WooCommerce's dev-only TWO_BRAND_CODE env var — near-identical names for different mechanisms was flagged as the cross-plugin confusion trap. - The vendor_name 'cross-plugin precedent' wording was misleading: WooCommerce sends the field from a merchant gateway option, not brand config. Both comments now state the source divergence (the semantic decision is recorded in the parity plan). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The checkout-api schema defines vendor_name as the marketplace
SELLER reference ('used to refer to the seller in a marketplace
setup') rendered on buyer invoices via Njord — a per-merchant
declaration, which is exactly how the WooCommerce plugin sources it
(gateway option). A brand is not a marketplace seller; the ticket's
'vendor_name from brand config' premise was wrong, and although the
Two brand shipped it inert (empty value, never sent), the mechanism
invited a partner edition to mislabel every merchant's invoices. The
key, the injector and its three call sites are gone; the real-builder
test still pins that brand machinery never adds identity keys to the
body. PrestaShop gaining real vendor_name support (a merchant
setting, WC-style) is a separate parity gap.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Conflict resolution: gate tests join the run list; the vendor_name payload-identity tests stay removed (this branch removed the mechanism). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Conflict resolution: gate tests join the run list; the removed vendor_name payload-identity tests stay removed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Conflict resolution keeps this branch's removal of the brand vendor_name payload-identity mechanism while adding the new platform-minimum conversion test and harness exposer. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Conflict resolution keeps this branch's removal of the payload-identity tests while adding the decline-hint test. Co-Authored-By: Claude Fable 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.
What
D2 of the plugin parity plan (TWO-24739 → TWO-24748). Ticket premise correction: the dev harness (Makefile with install/configure/proxy targets, compose stack,
dev/configure.php,.env.local.example) already exists from earlier work — the ticket predates it. The actual gaps:Stacked on #32 (needs the
PS_TWO_BRAND_CODEbrand seam).TWO_BRAND_CODEplumbed end-to-end:.env.local.example→make configure→dev/configure.php→PS_TWO_BRAND_CODEconfiguration value (which the TWO-24746 loader resolves tobrands/{code}.php). Included in configure.php's duplicate-row pruning.make test: runstests/run.phpin aphp:8.2container — same suite as CI.Test-coverage audit (ticket scope):
tests/run.php(TinyAssert harness, dependency-free) covers order composition, tax/discount edge cases, brand config, and address formatting; CI (tests.yml) lints + runs it on every PR. "Establish PHPUnit baseline" is superseded —phpunit.xml.distremains a stub for future adoption.Test plan
php -l dev/configure.phpmake testgreenmake install && make configure TWO_BRAND_CODE=twoon a dev box; confirmPS_TWO_BRAND_CODErow written once🤖 Generated with Claude Code