Files
floci/tools/partition/allowlist.yaml
T
Hector Ventura 0a601d54eb chore(tooling): gate partition literals in src/main against a per-file baseline (#4270)
P0 of the multi-partition plan. tools/partition/partition_literals.py inventories
the arn:aws: prefixes, amazonaws.com hosts, hosted-zone ids and hand-rolled
partition regexes in src/main/java per file against tools/partition/baseline.tsv.
A literal in a new file fails, growth in an existing file fails, and a drop fails
until the baseline is regenerated, so the remaining count only shrinks. Escapes
are a `// partition-literal: <reason>` comment or an allowlist.yaml entry.

Makefile targets (partition-check, partition-baseline, partition-audit,
partition-test), a python-only workflow, AGENTS.md and CONTRIBUTING.md
paragraphs, and the ResourceExplorer2 assertion now checks the partition against
the ARN's region instead of a literal arn:aws:.
2026-09-24 07:08:28 -04:00

23 lines
1.2 KiB
YAML

# Literals partition_literals.py must not count. Every entry needs a reason a reviewer can
# check; the audit prints how many occurrences each entry excuses.
#
# files: the whole file is exempt (path relative to the repo root)
# patterns: a Python regex matched against the full source line of the literal
files:
- path: src/main/java/io/github/hectorvent/floci/core/common/AwsNamespaces.java
reason: XML namespace URIs (http://s3.amazonaws.com/doc/2006-03-01/ and the Query
namespaces) are identifiers, not hosts, and are byte-identical in every partition;
minio and the China/GovCloud SDKs emit the same strings.
patterns:
- regex: amazonaws\.com/doc/\d{4}-\d{2}-\d{2}/
reason: an XML namespace URI outside AwsNamespaces (CloudFormation keeps its own);
the same partition-invariant identifier class as that file.
- regex: acs\.amazonaws\.com/groups/
reason: S3 canned-ACL grantee URIs (AllUsers, AuthenticatedUsers, LogDelivery) are
partition-invariant identifiers in the S3 model.
- regex: \bPARTITION_REGEX\b
reason: the line builds its regex from AwsArnUtils.PARTITION_REGEX, which is the
sanctioned way to recognise an ARN in any partition.