Skip to content

test(config): fail seven days before a dated config pack lapses - #11891

Merged
diegosouzapw merged 1 commit into
mainfrom
test/config-expiry-time-bomb
Aug 28, 2026
Merged

diegosouzapw merged 1 commit into
mainfrom
test/config-expiry-time-bomb

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Problema

config/alibaba-free-tier-allowlist.json tinha "validUntil": "2026-08-27". No dia 28, o loader passou a rejeitar o pacote — corretamente, é o desenho — e um teste que afirmava "o pacote versionado carrega" deixou toda PR e main vermelhas sem nenhum commit envolvido (#11866).

É uma bomba-relógio: a única classe de defeito que revisão de diff nunca pega, porque não há diff.

O que mudou

scripts/check/lib/configExpiry.mjs varre config/**/*.json por validUntil / validTo / expiresAt / expiry / expires (e formas snake_case), parseia as datas e classifica cada uma como expired / expiring (< 7 dias) / ok / unparseable.

O teste repo-wide falha 7 dias antes de qualquer pacote vencer, nomeando arquivo e chave. Exceções ficam num allowlist pequeno, cada entrada presa à issue que decide a renovação — e o teste falha no sentido contrário quando um pacote allowlistado deixa de estar vencendo, para a entrada não ficar obsoleta.

Âncora positiva: exige ao menos um pacote datado encontrado, para uma chave renomeada não transformar a suíte em no-op silencioso.

Validação

  • 4/4 verdes
  • TDD: removendo a entrada do allowlist, o teste falha com alibaba-free-tier-allowlist.json → validUntil=2026-08-27 is expired: renew the pack (or track it in ALLOWLIST with its issue) — verificado
  • ESLint limpo nos arquivos (o único aviso é "file ignored", scripts/check/lib/ está no ignore do repo)

Fica em aberto

A Alibaba está allowlistada contra #11866. Se a lista curada de free-tier ainda reflete a realidade é decisão de dado do operador; quando o pacote for renovado, a entrada do allowlist passa a falhar como obsoleta e deve ser removida.

Refs #11866
⚠️ base-red inherited: #11866 (Unit Tests (1/8) — o próprio teste da Alibaba, consertado em #11867)

config/alibaba-free-tier-allowlist.json carried "validUntil": "2026-08-27".
On the 28th the loader started rejecting it — correctly, that is the design —
and a test that asserted "the shipped pack loads" turned every PR and main red
with no commit involved (#11866). A time bomb: the one class of defect a diff
review can never catch, because there is no diff.

scripts/check/lib/configExpiry.mjs walks config/**/*.json for validUntil /
validTo / expiresAt / expiry / expires (and snake_case forms), parses the dates,
and classifies each as expired / expiring (< 7 days) / ok / unparseable.

The repo-wide test fails on expired or expiring packs unless the file is in a
small allowlist keyed to the issue that owns the renewal — and fails the OTHER
way when an allowlisted pack is no longer expiring, so entries cannot go stale.
A positive anchor requires at least one dated pack to be found, so a renamed
key cannot silently turn the suite into a no-op.

The Alibaba pack is allowlisted against #11866: whether the curated free-tier
list still matches reality is an operator data decision, not a test fix.
Removing that entry makes the suite fail as intended (verified).
@github-actions

Copy link
Copy Markdown
Contributor

CI Coverage Report

  • Coverage job: skipped
  • PR test policy: success

Coverage artifact was not available for this run.

@diegosouzapw
diegosouzapw merged commit 09de69e into main Aug 28, 2026
47 of 49 checks passed
diegosouzapw added a commit that referenced this pull request Aug 28, 2026
…e pipeline fixes

Brings e4683cd (#11867 Alibaba allowlist time bomb), 09de69e (#11891
config expiry detector), e71be03 (#11893 runner janitor), 9dc8eab
(#11895 provenance × self-hosted lint) and f564b64 (#11901 heavy-build
lanes). main is already an ancestor of this branch (v3.8.50 sync-back), so the
merge is exactly these five commits.

# Conflicts:
#	tests/unit/alibaba-free-tier-allowlist.test.ts
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…per-inference#11891)

config/alibaba-free-tier-allowlist.json carried "validUntil": "2026-08-27".
On the 28th the loader started rejecting it — correctly, that is the design —
and a test that asserted "the shipped pack loads" turned every PR and main red
with no commit involved (cheaper-inference#11866). A time bomb: the one class of defect a diff
review can never catch, because there is no diff.

scripts/check/lib/configExpiry.mjs walks config/**/*.json for validUntil /
validTo / expiresAt / expiry / expires (and snake_case forms), parses the dates,
and classifies each as expired / expiring (< 7 days) / ok / unparseable.

The repo-wide test fails on expired or expiring packs unless the file is in a
small allowlist keyed to the issue that owns the renewal — and fails the OTHER
way when an allowlisted pack is no longer expiring, so entries cannot go stale.
A positive anchor requires at least one dated pack to be found, so a renamed
key cannot silently turn the suite into a no-op.

The Alibaba pack is allowlisted against cheaper-inference#11866: whether the curated free-tier
list still matches reality is an operator data decision, not a test fix.
Removing that entry makes the suite fail as intended (verified).
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…e pipeline fixes

Brings 342ca95 (cheaper-inference#11867 Alibaba allowlist time bomb), ce53544 (cheaper-inference#11891
config expiry detector), 8b8d84d (cheaper-inference#11893 runner janitor), 9e87941
(cheaper-inference#11895 provenance × self-hosted lint) and 2fe1c30 (cheaper-inference#11901 heavy-build
lanes). main is already an ancestor of this branch (v3.8.50 sync-back), so the
merge is exactly these five commits.

# Conflicts:
#	tests/unit/alibaba-free-tier-allowlist.test.ts
@diegosouzapw
diegosouzapw deleted the test/config-expiry-time-bomb branch October 18, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant