@hublo/sentinel 1.7.0-alpha.35 → 1.7.0-alpha.36
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/README.md +1 -1
- package/dist/bin/sentinel.js +2 -2
- package/dist/{chunk-NGLEGAEN.js → chunk-5KNSTZ7F.js} +8 -3
- package/dist/chunk-5KNSTZ7F.js.map +1 -0
- package/dist/{chunk-IXXRITO5.js → chunk-OCTWLMUW.js} +4323 -3354
- package/dist/index.js +2 -2
- package/dist/roles/sql/config.d.ts +21 -1
- package/dist/roles/sql/config.js +5 -3
- package/docs/env-adoption.md +6 -35
- package/docs/sql-adoption.md +140 -27
- package/docs/typescript-traces.md +37 -72
- package/package.json +2 -1
- package/dist/chunk-NGLEGAEN.js.map +0 -1
package/README.md
CHANGED
|
@@ -176,7 +176,7 @@ throwaway run wants. Once a module has adopted, nothing is fetched any more: the
|
|
|
176
176
|
- [`docs/typescript-adoption.md`](docs/typescript-adoption.md) — the adoption cheat sheet: the two adoption steps, the command model (verb x type x location), options, reading a report, and troubleshooting.
|
|
177
177
|
- [`docs/test-adoption.md`](docs/test-adoption.md) — migrating a module from jest to Vitest: the two steps, what the migration rewrites and what it refuses BY NAME, how the baseline gate proves nothing was lost, and the failures worth recognising.
|
|
178
178
|
- [`docs/static-analysis-adoption.md`](docs/static-analysis-adoption.md) — running the static analysis role on a module: the two steps, the four output shapes, how to read each row and where its threshold comes from, declaring an entry point, and the two limits worth knowing before trusting a number.
|
|
179
|
-
- [`docs/sql-adoption.md`](docs/sql-adoption.md) — checking the migrations, the `Unsafe` calls
|
|
179
|
+
- [`docs/sql-adoption.md`](docs/sql-adoption.md) — checking the migrations, the `Unsafe` calls, the `Prisma.raw` calls and the SQL of `$queryRaw` / `$executeRaw` / `Prisma.sql` templates a branch adds or changes: the two steps, the 60 rules on by default and the 29 opt-in ones, the three levels in `sql.config.mjs` with an example, sentinel's two notes, and what the role does not read yet.
|
|
180
180
|
- [`docs/code-churn-adoption.md`](docs/code-churn-adoption.md) — the code churn role: the share of a module's new lines rewritten or deleted within 21 days, read from main's git history; adopting it, what it reads, how to read the figure, what it does not say, and how it was validated against `git blame`.
|
|
181
181
|
- [`docs/env-adoption.md`](docs/env-adoption.md) — checking a whole repository's env files, contracts and Dockerfiles from its root: the ten rules and which block, the three levels of `SENTINEL_ENV_LEVEL`, the optional `env.config.mjs`, and what changed from the monorepo's `tools/repo-env`.
|
|
182
182
|
- [`docs/typescript-traces.md`](docs/typescript-traces.md) — a **generated, versioned** reference of live command + output traces (every verb, option, config result and edge case) against the mock monorepo. Regenerate after CLI changes with `pnpm docs:traces`.
|
package/dist/bin/sentinel.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
presetNotInstalledYet,
|
|
14
14
|
registerAdapters,
|
|
15
15
|
resolve
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-OCTWLMUW.js";
|
|
17
17
|
import "../chunk-ZZMYV576.js";
|
|
18
18
|
import {
|
|
19
19
|
resolveContext,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
VERBS
|
|
43
43
|
} from "../chunk-APBEGLRI.js";
|
|
44
44
|
import "../chunk-TMVKYXZ3.js";
|
|
45
|
-
import "../chunk-
|
|
45
|
+
import "../chunk-5KNSTZ7F.js";
|
|
46
46
|
import "../chunk-XYOIXC6A.js";
|
|
47
47
|
import "../chunk-PXTU5MPW.js";
|
|
48
48
|
import "../chunk-4EIY7TTR.js";
|
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
var shared_default = {
|
|
7
7
|
migrations: {
|
|
8
8
|
include: ["**/migrations/*/migration.sql"],
|
|
9
|
-
exclude: []
|
|
9
|
+
exclude: [],
|
|
10
|
+
indexesFrom: []
|
|
10
11
|
},
|
|
11
12
|
unsafe: {
|
|
12
13
|
includeTests: true,
|
|
@@ -177,6 +178,9 @@ function defineSql(input = {}) {
|
|
|
177
178
|
moved: leafPaths(input.overrides).sort()
|
|
178
179
|
};
|
|
179
180
|
}
|
|
181
|
+
function withDefaults(resolved) {
|
|
182
|
+
return mergeInto(defaults, resolved);
|
|
183
|
+
}
|
|
180
184
|
|
|
181
185
|
export {
|
|
182
186
|
TARGET,
|
|
@@ -185,6 +189,7 @@ export {
|
|
|
185
189
|
SCRIPTS,
|
|
186
190
|
defaults,
|
|
187
191
|
squawkRules,
|
|
188
|
-
defineSql
|
|
192
|
+
defineSql,
|
|
193
|
+
withDefaults
|
|
189
194
|
};
|
|
190
|
-
//# sourceMappingURL=chunk-
|
|
195
|
+
//# sourceMappingURL=chunk-5KNSTZ7F.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/roles/sql/presets/shared.json","../src/roles/sql/presets/squawk-rules.json","../src/roles/sql/preset-data.ts","../src/roles/sql/configs/define.ts"],"sourcesContent":["{\n \"migrations\": {\n \"include\": [\"**/migrations/*/migration.sql\"],\n \"exclude\": [],\n \"indexesFrom\": []\n },\n \"unsafe\": {\n \"includeTests\": true,\n \"tests\": [\n \"**/{test,tests,__tests__,e2e,fixtures,mocks,__mocks__,test-utils}/**\",\n \"**/*.{spec,test,integration-spec,e2e-spec,steps,test-util,mock}.{ts,mts,cts}\"\n ]\n },\n \"ignore\": [\"**/node_modules/**\", \"**/dist/**\", \"**/coverage/**\"],\n \"pgVersion\": \"16.8\",\n \"rules\": {}\n}\n","{\n \"squawk\": \"2.72.0\",\n \"rules\": [\n \"adding-field-with-default\",\n \"adding-foreign-key-constraint\",\n \"adding-not-nullable-field\",\n \"adding-required-field\",\n \"adding-serial-primary-key-field\",\n \"ban-add-column\",\n \"ban-add-composite-attribute\",\n \"ban-add-enum-value\",\n \"ban-alter-database-options\",\n \"ban-alter-domain-with-add-constraint\",\n \"ban-alter-extension\",\n \"ban-alter-function-options\",\n \"ban-alter-generated-expression\",\n \"ban-alter-identity\",\n \"ban-alter-policy-condition\",\n \"ban-alter-policy-roles\",\n \"ban-alter-role-options\",\n \"ban-alter-row-level-security\",\n \"ban-alter-sequence-values\",\n \"ban-alter-system-options\",\n \"ban-alter-view-options\",\n \"ban-char-field\",\n \"ban-concurrent-index-creation-in-transaction\",\n \"ban-create-domain-with-constraint\",\n \"ban-create-policy\",\n \"ban-detach-inheritance\",\n \"ban-disable-trigger\",\n \"ban-drop-column\",\n \"ban-drop-constraint\",\n \"ban-drop-database\",\n \"ban-drop-default\",\n \"ban-drop-domain\",\n \"ban-drop-extension\",\n \"ban-drop-function\",\n \"ban-drop-generated-expression\",\n \"ban-drop-index\",\n \"ban-drop-not-null\",\n \"ban-drop-policy\",\n \"ban-drop-schema\",\n \"ban-drop-sequence\",\n \"ban-drop-table\",\n \"ban-drop-trigger\",\n \"ban-drop-type\",\n \"ban-drop-view\",\n \"ban-duplicate-column-assignments\",\n \"ban-new-write-restriction\",\n \"ban-replace-view-function\",\n \"ban-replica-identity\",\n \"ban-revoke\",\n \"ban-set-default\",\n \"ban-set-schema\",\n \"ban-truncate-cascade\",\n \"ban-uncommitted-transaction\",\n \"changing-column-type\",\n \"constraint-missing-not-valid\",\n \"disallowed-unique-constraint\",\n \"identifier-too-long\",\n \"prefer-bigint-over-int\",\n \"prefer-bigint-over-smallint\",\n \"prefer-identity\",\n \"prefer-repack\",\n \"prefer-robust-stmts\",\n \"prefer-text-field\",\n \"prefer-timestamp-tz\",\n \"renaming-column\",\n \"renaming-object\",\n \"renaming-table\",\n \"require-concurrent-index-creation\",\n \"require-concurrent-index-deletion\",\n \"require-concurrent-partition-detach\",\n \"require-concurrent-reindex\",\n \"require-enum-value-ordering\",\n \"require-lock-timeout\",\n \"require-statement-timeout\",\n \"require-table-schema\",\n \"transaction-nesting\"\n ],\n \"optIn\": [\n \"ban-add-column\",\n \"ban-add-composite-attribute\",\n \"ban-add-enum-value\",\n \"ban-alter-database-options\",\n \"ban-alter-extension\",\n \"ban-alter-function-options\",\n \"ban-alter-generated-expression\",\n \"ban-alter-policy-condition\",\n \"ban-alter-policy-roles\",\n \"ban-alter-role-options\",\n \"ban-alter-row-level-security\",\n \"ban-alter-sequence-values\",\n \"ban-alter-system-options\",\n \"ban-alter-view-options\",\n \"ban-create-policy\",\n \"ban-detach-inheritance\",\n \"ban-disable-trigger\",\n \"ban-drop-index\",\n \"ban-drop-policy\",\n \"ban-drop-trigger\",\n \"ban-new-write-restriction\",\n \"ban-replace-view-function\",\n \"ban-replica-identity\",\n \"ban-revoke\",\n \"ban-set-default\",\n \"require-table-schema\"\n ],\n \"aliases\": {\n \"prefer-timestamptz\": [\"prefer-timestamp-tz\"],\n \"require-timeout-settings\": [\"require-lock-timeout\", \"require-statement-timeout\"]\n }\n}\n","/**\n * The SQL role's values: what it reads, where it writes, and what a module may move.\n *\n * ## What this role guards, and in which order\n *\n * The study behind it (`docs/sql-verification-study.md`, HUB-45374, issue #150) measured where our\n * SQL lives and set the order, cheapest first:\n *\n * 1. **migrations**, read by squawk. On the monorepo (`main` 0eb8be6550d, 2026-11-14): 871\n * `migration.sql` across 21 modules, 135 of them added by 84 pull requests in five weeks.\n * 2. **the `Unsafe` calls** (`$queryRawUnsafe`, `$executeRawUnsafe`), read by a rule of ours. 226\n * calls the same day: 23 in production code, 203 in tests. And `Prisma.raw`, whose text is SQL\n * inside a tagged query, by the same rule under its own name: 97 calls on `main` f12da701121.\n *\n * 3. **the SQL of tagged templates** (`$queryRaw`, `$executeRaw`, `Prisma.sql`), read with\n * PostgreSQL's own parser (`libpg-query`) by rules of ours, the 19 May incident's first (#178):\n * 1 587 templates on `main` 837abe3f29c, 91 % of the production ones read alone.\n *\n * The ORM chain comes later, in this same role.\n *\n * ## Which modules: the ones that hold SQL, whatever their preset\n *\n * Decided from what the module HOLDS, never from its preset, which is the rule sentinel already\n * follows: the build role reads its own Vite config rather than trusting a preset. A preset says\n * which stack a module is written in, not whether it talks to a database. `libs/nest/signal-bus`\n * is `nest` (its code imports `@nestjs/`) and holds no SQL at all, it carries signals over Redis;\n * `libs/nest/db-main` holds 442 of the 871 migrations. Both are `nest`, and only one concerns this\n * role.\n *\n * So the role applies to every preset, like six of the seven before it, and `--init` skips a module\n * holding neither a migration nor an `Unsafe` call. A front end holds neither, so it is skipped\n * with no line of code about front ends. Measured with dry runs on `apps/front/host-admin`,\n * `libs/front/components`, `libs/nest/signal-bus` (skipped), `libs/nest/db-main` and `network`\n * (adopted).\n */\nimport sharedData from './presets/shared.json'\nimport squawkRulesData from './presets/squawk-rules.json'\n\n/** The target this role serves, and the flag that runs it: `sentinel --run --sql`. */\nexport const TARGET = 'sql'\n\n/** The file a module writes at its root to move a setting. Optional at every moment. */\nexport const SQL_CONFIG_FILE = 'sql.config.mjs'\n\n/**\n * Where the files of `--output json|html|markdown` land, inside the module.\n *\n * Its own directory rather than `static-analysis-report/`: two roles writing into one folder would\n * each clear the other's stale files.\n */\nexport const REPORT_DIR = 'sql-report'\n\n/**\n * One script per shape a DEVELOPER runs. `markdown` gets none: it is the pull request comment a CI\n * workflow produces, the decision static analysis took for the same reason.\n */\nexport const SCRIPTS = {\n console: 'sql',\n json: 'sql:json',\n html: 'sql:html',\n} as const\n\n/** A rule's level. `off` is a module's decision, and the report prints it as one. */\nexport type Severity = 'off' | 'warn' | 'error'\n\nexport interface SqlDefaults {\n /** The migration files squawk reads, as globs relative to the module. */\n migrations: {\n /**\n * ⛔ `migration.sql` BY NAME, and that is what keeps the rollback scripts out. Beside the 871\n * migrations sit 385 `down.sql`, 2 `drop.sql` and one `donw.sql`: scripts a human runs by hand,\n * which Prisma never applies. Reading them would report every `DROP` they are made of, for a\n * file that never reaches production through a deploy. Naming the file Prisma applies, rather\n * than excluding the others, also keeps out the misspelling nobody would think to exclude.\n */\n include: string[]\n /** Migrations a module chooses not to read. Empty by default. */\n exclude: string[]\n /**\n * Other migrations directories, relative to the module, whose INDEXES this module's queries\n * use: never checked, only read for the trigram indexes `leading-wildcard-like` asks about.\n *\n * For a module that queries a database another module migrates. On the monorepo every trigram\n * index is in `libs/nest/db-main` (main 190dc8e3595), and `mission`, `network` or `institution`\n * query its tables: without this, the rule would say of their searches that no index serves\n * them. Empty by default: the module's own migrations only, and the message says so.\n */\n indexesFrom: string[]\n }\n /** What the `Unsafe` rule reads. */\n unsafe: {\n /**\n * Read the tests too. ON by default: 203 of the 226 `Unsafe` calls are in tests, and a call\n * that is safe today is not safe by construction tomorrow. A module that decides otherwise sets\n * it to false, and the report says so; the decision is the team's.\n */\n includeTests: boolean\n /**\n * What counts as a test, by PATH. Measured on the monorepo before it was written: the filter\n * `*.spec.*` alone let 149 test calls through as production, because `*.integration-spec.ts`,\n * `*.steps.ts`, `tests/database/` and `*.test-util.ts` are all test code and none of them\n * matches it.\n */\n tests: string[]\n }\n /** Directories never read, whatever the includes say. */\n ignore: string[]\n /**\n * The PostgreSQL version squawk checks against, since some rules depend on it.\n *\n * 16.8 is the version the monorepo pins (`postgres:16.8`, in its integration tests and its\n * database tooling). The role reads what the repository declares and never asks production.\n */\n pgVersion: string\n /**\n * Each rule's level, by name. Empty means every rule at its default, `warn` in this version: the\n * role refuses nothing while its adoption runs.\n */\n rules: Record<string, Severity>\n}\n\n/**\n * The role's values, read from `presets/shared.json`: preset data is JSON, never TypeScript, in every\n * role (AGENTS.md, and `tests/role-layout.test.ts` holds it). The reasons for each value are the\n * comments on `SqlDefaults` above, since JSON carries none.\n */\nexport const defaults: SqlDefaults = sharedData as SqlDefaults\n\n/**\n * squawk's rule names, for the version sentinel pins: what `rules` in `sql.config.mjs` may name.\n *\n * Data about the tool rather than a preset, kept beside the presets like `build`'s\n * `requirements.json`. Taken from squawk's own source at the pinned tag\n * (`crates/squawk_linter/src/lib.rs`, the names a finding carries and `is_opt_in`), and held to the\n * binary by a test: every name here is accepted by the installed squawk, and the version here is\n * the version installed, so a squawk bump that renames a rule fails the build instead of a module.\n *\n * - `rules`, the names findings carry. `unused-ignore` is left out: squawk reports it about its own\n * ignore comments, and refuses it in a config.\n * - `optIn`, the rules squawk runs only when a config names them.\n * - `aliases`, names squawk accepts that no finding carries. A level set on one would never meet a\n * finding, so the role refuses it and names the rule(s) it stands for.\n */\nexport interface SquawkRules {\n squawk: string\n rules: string[]\n optIn: string[]\n aliases: Record<string, string[]>\n}\n\nexport const squawkRules: SquawkRules = squawkRulesData\n","/**\n * `defineSql`: what a module imports to declare its own SQL settings.\n *\n * ```js\n * // sql.config.mjs\n * import { defineSql } from '@hublo/sentinel/sql'\n *\n * export default defineSql({\n * root: import.meta.dirname,\n * overrides: { unsafe: { includeTests: false } },\n * })\n * ```\n *\n * The shape of `defineStaticAnalysis`, for the two reasons stated there. A function receives the\n * module's INTENT, the keys it actually passed, and merges them here, so setting one key never\n * drops its siblings: a spread in the module's file would replace the whole `unsafe` block to set\n * `includeTests`, and lose `tests` with nobody seeing it. And the defaults are never copied into a\n * module, so a changed default reaches every module at the next release instead of leaving stale\n * copies behind.\n *\n * `overrides` REPLACES what it names, lists included, and every path it sets lands in `moved`, so\n * the report prints `(module)` beside it: two modules measured with different settings no longer\n * compare, and the reader has to be told.\n */\nimport { isPlainObject } from '../../../shared/deep-merge.js'\nimport { defaults, type SqlDefaults } from '../preset-data.js'\n\ntype DeepPartial<T> = { [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K] }\n\n/** What a module's config file passes. Everything is optional, including the file itself. */\nexport interface SqlInput {\n /** The module's own directory, normally `import.meta.dirname`. */\n root?: string\n /** The seam. Replaces whatever it names, and every path it sets lands in `moved`. */\n overrides?: DeepPartial<SqlDefaults>\n}\n\nexport interface ResolvedSqlConfig extends SqlDefaults {\n /** The module's directory, or null when its config file did not say. */\n root: string | null\n /** Dotted paths the module set through `overrides`, sorted so two runs print the same report. */\n moved: string[]\n}\n\n/**\n * Merge `patch` into `base`, recursively, patch winning.\n *\n * Arrays are REPLACED, never concatenated: a merge that concatenates cannot express \"replace this\n * list\", which is exactly what a team reaching for `overrides` asks for. `rules` is a record, so\n * a module naming one rule keeps the levels of every other.\n */\nfunction mergeInto<T>(base: T, patch: unknown): T {\n if (!isPlainObject(patch)) return base\n if (!isPlainObject(base)) return patch as T\n const out: Record<string, unknown> = { ...base }\n for (const [key, value] of Object.entries(patch)) {\n out[key] = isPlainObject(value) ? mergeInto(out[key], value) : value\n }\n return out as T\n}\n\n/** Every leaf path in `patch`, dotted, so a reader can be told what the module decided. */\nfunction leafPaths(patch: unknown, prefix = ''): string[] {\n if (!isPlainObject(patch)) return prefix ? [prefix] : []\n return Object.entries(patch).flatMap(([key, value]) =>\n leafPaths(value, prefix ? `${prefix}.${key}` : key),\n )\n}\n\n/** The keys `defineSql` reads. */\nconst INPUT_KEYS: readonly string[] = ['root', 'overrides']\n\n/** Resolve a module's declaration against this role's defaults. */\nexport function defineSql(input: SqlInput = {}): ResolvedSqlConfig {\n // ⛔ `override:` for `overrides:` would otherwise resolve to the defaults in silence, the module\n // believing it moved a setting. Thrown, so the loader names the file and the key.\n const unknown = Object.keys(input).filter((key) => !INPUT_KEYS.includes(key))\n if (unknown.length > 0) {\n throw new Error(\n `defineSql takes ${INPUT_KEYS.map((key) => `\\`${key}\\``).join(' and ')}; ` +\n `${unknown.map((key) => `\\`${key}\\``).join(', ')} would be ignored.`,\n )\n }\n return {\n ...mergeInto(defaults, input.overrides),\n root: input.root ?? null,\n moved: leafPaths(input.overrides).sort(),\n }\n}\n\n/**\n * A config another version of `defineSql` resolved, with this version's defaults under it.\n *\n * ⛔ A module's `sql.config.mjs` imports `defineSql` from the sentinel its own `node_modules` holds,\n * which may be older than the one running: a setting added since (`migrations.indexesFrom`,\n * 1.7.0-alpha.34) is then missing, and the rule reading it threw, its findings dropped with nothing\n * said (found on the alpha.34 replay). Every value the module resolved is kept; only a missing\n * setting takes the default.\n */\nexport function withDefaults(resolved: ResolvedSqlConfig): ResolvedSqlConfig {\n return mergeInto<SqlDefaults>(defaults, resolved) as ResolvedSqlConfig\n}\n"],"mappings":";;;;;AAAA;AAAA,EACE,YAAc;AAAA,IACZ,SAAW,CAAC,+BAA+B;AAAA,IAC3C,SAAW,CAAC;AAAA,IACZ,aAAe,CAAC;AAAA,EAClB;AAAA,EACA,QAAU;AAAA,IACR,cAAgB;AAAA,IAChB,OAAS;AAAA,MACP;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EACA,QAAU,CAAC,sBAAsB,cAAc,gBAAgB;AAAA,EAC/D,WAAa;AAAA,EACb,OAAS,CAAC;AACZ;;;AChBA;AAAA,EACE,QAAU;AAAA,EACV,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;A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