tagreeve 0.7.0 → 0.8.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0-rc.1
4
+
5
+ The first release candidate of 0.8.0. Install it with `npm i -g tagreeve@next`. 0.8.0-rc.1 adds a consent audit and fixes after 0.7.0. It has no new command. The record stays at schema version 5. To go back to the final release, run `npm i -g tagreeve`.
6
+
7
+ ### What 0.8.0-rc.1 adds
8
+
9
+ - A consent matrix. `suite --consent accept,reject,none,withdraw` runs each scenario once per consent state as a cell, with its own record and table column, and prints what each vendor got in each state. `withdrawWith` is a scenario option, and `suite.json` gets an optional `consentMatrix` (#1391).
10
+ - Canaries. `options.canaries: true` plants six fake click IDs on the start URL (gclid, gbraid, wbraid, fbclid, msclkid, ttclid). A start URL that already holds one of them exits 2. The summaries name the canaries and never print a value (#1391).
11
+ - Identifier routes. A run follows a canary or the run's own identity to the vendor requests it reaches: direct, through the page URL, through a first-party cookie or through the local server container. The `identifierRoute` and `canarySearch` flags say what was found and what was searched or skipped (#1391).
12
+ - The `identifierRoute` built-in check. It fails when a canary reaches a vendor that the consent in force did not allow, and warns on a page URL route alone. Runs without canaries keep their results and exit codes. Set it with `builtins: { identifierRoute: warn }` (#1391).
13
+ - The consent audit report. The HTML report of a consent suite has a Consent audit section, and the run report an Identifier routes section (#1391).
14
+ - Server container: a Stape loader request for `/g/collect` or `/data` goes to the local container at its real path, where it got a 404 before. The Server container line adds the count (#1622).
15
+ - Server container: a request with a replaced secret lists the secret names in `secretsRedacted`, never a value (#1585).
16
+ - Install docs give `npm i -g tagreeve`, and `@next` for the newest release candidate (#1587).
17
+ - Docs name the earlier fixes, the `platformHost` flag, the Server container counts and the consent command forms (#1583, #1533, #1532).
18
+
19
+ ### Fixes in 0.8.0-rc.1
20
+
21
+ - Server-side rules read cannot evaluate, with the `serverContainerRejected` note, when the container rejects most browser requests. They failed or passed on missing data before (#1579).
22
+ - The identity matcher counts an email or phone as the run's own only when the whole value matches, so foreign values that merely contain it are reported (#1519).
23
+ - `idHandover` compares session IDs per client ID, so another client's session cannot hide a difference (#1531).
24
+ - `dataLayer` rules: a `dataLayerNotHooked` loader survives an aborted navigation and a popup or other frame, an unknown key that looks like a value is masked in the error, and a `__proto__` type path is checked (#1530).
25
+ - Consent commands read a nested array and ignore `gtm.` keys, such as the `gtm.uniqueEventId` stamp, in an indexed consent default (#1532, #1513).
26
+ - `diff` shows a `dataLayer` path that moved to a neighbouring consent epoch as one moved path, not a missing path plus a new path (#1584).
27
+ - A baseline compare gives one warning, not drift, when a gcd letter changes between `p` and `q`, or between `t` and `v` (#1569).
28
+ - `addToCart` failures name the store's status and the cart path, and a 429 is named as rate limited (#1576).
29
+ - The fixture site sends the relay page view after the consent step (#1618).
30
+
31
+ ### Upgrading from 0.7.0
32
+
33
+ - **A new built-in check can fail.** `identifierRoute` fails by default, but only for a run with `options.canaries: true`. A run without canaries is not affected.
34
+ - **Server-side rules can read cannot evaluate.** When the local container rejects most browser requests, a `sentBy: server` rule or a rule with no `sentBy` now warns where 0.7.0 failed or passed.
35
+ - **The identity matcher is stricter.** It counts only a whole email or phone value, so a run can show a foreign value that 0.7.0 hid.
36
+ - **A moved `dataLayer` path is one line in `diff`.** `diff --json` gets `dataLayer.pathsMoved`.
37
+ - **The record stays at version 5.** A 0.7.0 record reads as before.
38
+
39
+ ### Known in 0.8.0-rc.1
40
+
41
+ Issues still open that you can meet, in addition to those in 0.7.0:
42
+
43
+ - The canary search reads only the forms it lists. It skips gzip and binary bodies, bodies cut at 64 KiB and net-log requests with no body, and it does not search headers. A pass means no planted value was found in the searched forms.
44
+ - Observed runtime IDs are not searched. Only the planted click IDs and the run's identity are (#1391, slice 3).
45
+ - The consent audit is not field-tested on a real store.
46
+ - The Stape loader unwrap covers `/g/collect` and `/data`. Stape's hosting layer may act on a loader request in other ways, and the record says so in fixed text.
47
+
3
48
  ## 0.7.0
4
49
 
5
50
  `npm i -g tagreeve` installs this release. 0.7.0 adds everything in the 0.7.0 release candidates (below), with no code change after rc.4. It has no new command. The record stays at schema version 5. To upgrade from 0.6.2, read the next section.
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  Agent-first testing for tags and consent. Tagreeve plays a visitor in a real browser, records every tracking hit the site sends, and checks the result against what you expect. Web tag reports (which GTM web tags fired) come from a GTM template you install. Server tag reports are planned.
11
11
 
12
- > **Status: 0.7 (`0.7.0`).** Tagreeve plays a visitor in Chromium, records and decodes hits, answers the consent banner, checks YAML expectations and writes a JSONL record. 0.3 adds rules on payload fields and cookies, a `deniedIdentifiers` check, `tagreeve suite`, an HTML report, a Done control for handoff steps, role-based locators and a `select` step. 0.4 adds handoffs that end by themselves, an opt-in test payment step, baselines, a viewport option and fake identities by country. 0.5 adds `--server-container`, which runs your own server container in Docker and records what it sends to each vendor, a Conversions API decoder, several stores in one suite and platform hosts for Shopify. 0.6.0-rc.1 adds path defaults, `tagreeve init`, `tagreeve/config.yml`, `--label`, default baseline paths and `suite --baseline`, exact links between server container calls and browser hits by client ID, and the frame of each `dataLayer` push. 0.6.0-rc.2 adds web tag reports, `tagreeve template web`, `tag` rules, `expectedTags`, masked `dataLayer` push shapes in `diff` and baselines, and the `consentModeSetup` check. 0.6.0-rc.3 fixes the reporter in real GTM, keeps the `dataLayer` hook working when a page replaces `push`, adds push kinds and a `dataLayerIncomplete` flag, and sends handoff text to stderr. 0.6.0 is rc.3 with the release prep and no code change; it was field-tested on a real store with a real GTM web container in a workspace preview (rc.2 and rc.3). The rest of this README describes where Tagreeve is going, and marks what is not built yet. The design is in [docs/design.md](docs/design.md). Feedback is welcome in issues.
12
+ > **Status: 0.8 (`0.8.0-rc.1`).** Tagreeve plays a visitor in Chromium, records and decodes hits, answers the consent banner, checks YAML expectations and writes a JSONL record. 0.3 adds rules on payload fields and cookies, a `deniedIdentifiers` check, `tagreeve suite`, an HTML report, a Done control for handoff steps, role-based locators and a `select` step. 0.4 adds handoffs that end by themselves, an opt-in test payment step, baselines, a viewport option and fake identities by country. 0.5 adds `--server-container`, which runs your own server container in Docker and records what it sends to each vendor, a Conversions API decoder, several stores in one suite and platform hosts for Shopify. 0.6.0-rc.1 adds path defaults, `tagreeve init`, `tagreeve/config.yml`, `--label`, default baseline paths and `suite --baseline`, exact links between server container calls and browser hits by client ID, and the frame of each `dataLayer` push. 0.6.0-rc.2 adds web tag reports, `tagreeve template web`, `tag` rules, `expectedTags`, masked `dataLayer` push shapes in `diff` and baselines, and the `consentModeSetup` check. 0.6.0-rc.3 fixes the reporter in real GTM, keeps the `dataLayer` hook working when a page replaces `push`, adds push kinds and a `dataLayerIncomplete` flag, and sends handoff text to stderr. 0.6.0 is rc.3 with the release prep and no code change; it was field-tested on a real store with a real GTM web container in a workspace preview (rc.2 and rc.3). 0.7.0 adds the `earlyIdentityPush`, `idHandover` and `serverContainerRejected` checks and `dataLayer:` rules. 0.8.0-rc.1 adds a consent audit: `suite --consent`, identifier canaries and the `identifierRoute` check. The rest of this README describes where Tagreeve is going, and marks what is not built yet. The design is in [docs/design.md](docs/design.md). Feedback is welcome in issues.
13
13
  >
14
14
  > **In 0.1:** `tagreeve run` with `stub` and `live` network modes; consent epochs, with withdrawals labelled apart from first rejects; seeded fake identities, hash checks and leak detection; decoders for GA4, Google Ads, Meta, Stape custom loader and a minimal server-container data client; banner handling through autoconsent; expectations; JSONL output.
15
15
  >
@@ -17,6 +17,8 @@ Agent-first testing for tags and consent. Tagreeve plays a visitor in a real bro
17
17
  >
18
18
  > **In 0.3:** `body.has` and `body.only` rules on the field names of a hit; `cookie` rules; a `deniedIdentifiers` check that fails when an identifier goes out on a denied hit; `tagreeve suite` runs a folder of scenarios against several GTM builds; `tagreeve report` writes an HTML report of one run or a suite; a Done button in the handoff window; `click` and `wait` by role and name or from a list of selectors; a `select` step; the `server` network mode; record schema version 2. `deniedIdentifiers` fails by default, so a run that passed in 0.2 can exit 1. See [CHANGELOG.md](CHANGELOG.md).
19
19
  >
20
+ > **In 0.8.0-rc.1:** a consent audit. `tagreeve suite --consent accept,reject,none,withdraw` runs each scenario once per consent state and prints what each vendor got in each state. `options.canaries: true` plants six fake click IDs on the start URL, and the run follows each canary (and the run's own identity) to the vendor requests it reaches, through the page URL, a first-party cookie and the local server container. The new `identifierRoute` check fails when a canary reaches a vendor that consent did not allow. The HTML report of a consent suite has a Consent audit section and the run report an Identifier routes section. Fixes: server-side rules read cannot evaluate when the container rejects most requests, a Stape loader request reaches the local container at its real path, the identity matcher needs a whole value, `idHandover` compares session IDs per client ID, `dataLayer` rules and consent command forms handle more real shapes, and `diff` shows a moved `dataLayer` path as one line. The record stays at schema version 5. `npm i -g tagreeve@next` installs it. What is new is in [CHANGELOG.md](CHANGELOG.md) under 0.8.0-rc.1.
21
+ >
20
22
  > **In 0.7.0:** everything in the 0.7.0 release candidates, with no code change after rc.4. Three new built-in checks: `earlyIdentityPush` warns when a `dataLayer` push carries the run's own test identity before consent, `idHandover` warns when the GA4 client or session ID differs between two contexts, and `serverContainerRejected` warns when the local server container rejects most browser requests. All three warn by default and can be set to `fail`. `dataLayer:` rules check which pushes a page makes. A `consent default` pushed as a plain object now counts for `consentModeSetup`. `diff` keeps a cross-epoch join. The fixture site has a plain GTM demo shop. Releases are published from CI with npm provenance. The record stays at schema version 5. `npm i -g tagreeve` installs it. To upgrade from 0.6.2, read "Upgrading from 0.6.2" in [CHANGELOG.md](CHANGELOG.md). What is still open is in the same file under "Known in 0.7.0".
21
23
  >
22
24
  > **In 0.6.2:** fixes after 0.6.1, with no new command and no new option. A test payment ends by its deadline when a card frame stops answering. A scoped `must` rule can now warn where 0.6.1 failed, so a run can exit 0. `diff --json` has `renamedFrom` and `pushKind`. `tagreeve init` creates nothing when a target is refused. The record stays at schema version 5. `npm i -g tagreeve` installs it. To upgrade from 0.6.1, read "Upgrading from 0.6.1" in [CHANGELOG.md](CHANGELOG.md). What is still open is in the same file under "Known in 0.6.2".
@@ -55,6 +57,7 @@ Tagreeve is built so that a coding agent, a CI job or a person can answer these
55
57
 
56
58
  - What did the site send to each vendor, before and after the visitor's consent choice?
57
59
  - Which tags fired for each event, and which expected tags did not? See [Report which tags fired](docs/guide/tag-reports.md).
60
+ - What does each consent state send, and where does a planted click ID go? See [Audit consent across the four states](docs/guide/consent-audit.md).
58
61
  - Does an unpublished GTM workspace behave as intended, before you publish it? Run the same scenario with and without `--gtm-override` and compare the two records with `tagreeve diff`. (In 0.2.)
59
62
 
60
63
  ## What it does
@@ -94,15 +97,15 @@ tagreeve run scenarios/undecided-visitor.yml --site https://staging.example.com
94
97
  ## Install
95
98
 
96
99
  ```bash
97
- npm i -g tagreeve@next
100
+ npm i -g tagreeve
98
101
  tagreeve install-browser
99
102
  ```
100
103
 
101
- Node 22.18 or later. `npm i -g tagreeve@next` installs the newest release candidate. Other ways to install, from a git tag or a tarball, are in [docs/cli.md](docs/cli.md).
104
+ Node 22.18 or later. `npm i -g tagreeve` installs the newest final release, and `npm i -g tagreeve@next` the newest release candidate. Other ways to install, from a git tag or a tarball, are in [docs/cli.md](docs/cli.md).
102
105
 
103
106
  ## Quick start
104
107
 
105
- 1. `npm i -g tagreeve@next`
108
+ 1. `npm i -g tagreeve`
106
109
  2. `tagreeve install-browser`. In a project folder, `tagreeve init` makes `tagreeve/scenarios/` and `tagreeve/baselines/`, writes a starter `tagreeve/config.yml` and keeps `tagreeve/runs/` out of git.
107
110
  3. Write `scenario.yml`:
108
111
 
@@ -195,6 +198,7 @@ options:
195
198
  - `consentModeSetup` is a built-in check. It warns when a Google hit shows a Consent Mode signal that was never set, for example a default without `ad_user_data` and `ad_personalization`. It reads the `gcd` value of each hit. It is `warn` by default. Set it to `fail` to fail the run.
196
199
  - `idHandover` is a built-in check. It warns when the GA4 client ID or session ID does not carry over between contexts, such as a checkout on another host or in a frame. It names the measurement ID and the contexts and never prints an ID. It is `warn` by default. Set it to `fail` to fail the run.
197
200
  - `serverContainerRejected` is a built-in check for runs with `--server-container`. It warns when more than half of the browser requests to the container, and at least 2, get status 400 or higher or no answer. Its message gives counts and status codes and never a path or ID. It is `warn` by default. Set it to `fail` to fail the run.
201
+ - `identifierRoute` is a built-in check for runs with `canaries: true`. It fails when a fake click ID or the run's fake email or phone reaches a host outside the site while consent forbids it, and warns when only the page URL carries it. A pass means that nothing was found in the searched forms of the URL, body and decoded fields. Headers, including Referer and Cookie, are not searched. `builtins: { identifierRoute: warn }` makes every finding a warning.
198
202
  - `earlyIdentityPush` is a built-in check. It warns when a `dataLayer` push carries the run's own test email or phone, or a hash of either, while consent is not given. It never prints the value. It is `warn` by default. Set it to `fail` to fail the run.
199
203
  - `click` and `wait` take `{ role, name }` or `{ any: [selectors] }`, so a theme change does not break every scenario. `select` chooses an option of a `<select>` by value, then by label, and reads it back.
200
204