Commit graph

666 commits

Author SHA1 Message Date
Francisco Ignácio Fontoura Solla
a7a3883bc2 chore: remove cutover residue (stage scripts, checklist, PR template)
Delete dead db:refresh:stage / agent:promote; mark CUTOVER done; drop
STAGE_DATABASE_URL checklist item that no longer applies.
2026-08-01 01:00:39 -03:00
Francisco Solla
e61e80b6dc
Merge pull request #72 from fsolla/cursor/agent-pr-automerge-safety-net-df16
OPS: Ready+auto-merge for all agent PRs (audit included)
2026-08-01 00:57:32 -03:00
Cursor Agent
b150644d21
OPS: Ready+auto-merge for all agent PRs including audit
Remove the engineering-audit artifact exception; add a GHA safety net
that marks cursor/* → main PRs Ready and arms auto-merge.
2026-08-01 03:55:56 +00:00
Francisco Solla
8de399b9bb
Merge pull request #71 from fsolla/cursor/agent-pr-ready-automerged-df16
fix(agents): PRs Ready + auto-merge também no Cloud (draft:false)
2026-08-01 00:52:38 -03:00
Cursor Agent
69aafbb219
fix(agents): alwaysApply Ready+auto-merge; Cloud must pass draft:false
agent-pr-workflow was correct but not alwaysApply, so Cloud agents
followed ManagePullRequest's draft default. Make the rule always-on,
document the ManagePullRequest path, and narrow the engineering-audit
"no auto-merge" exception to the audit sign-off PR only.
2026-08-01 03:51:08 +00:00
Francisco Solla
ffb2ab6042
Merge pull request #70 from fsolla/cursor/model-selection-grok-effort-df16
docs(agent-pool): /agent-pool status-first + confirmação antes de start
2026-08-01 00:49:50 -03:00
Cursor Agent
df76e70a8a
docs(agent-pool): invoke flow is status-first, confirm before start
Skill no longer reads as start-only: always emit pool status + eligible
queue with the next maxSlots highlighted; ask before start when off;
when already on, stay in session monitoring without auto-restart.
2026-08-01 03:48:19 +00:00
Francisco Solla
33c1f263eb
Merge pull request #69 from fsolla/cursor/model-selection-grok-effort-df16
fix(agent-pool): Grok effort slugs + banir -fast
2026-08-01 00:43:00 -03:00
Cursor Agent
18fe4f8e9b
fix(agent-pool): ban -fast model slugs
Never map or request fast=true. Slugs ending in -fast are stripped to
the base (with a warn); model-selection and the pool plan document the ban.
2026-08-01 03:34:35 +00:00
Cursor Agent
629364f3e4
fix(agent-pool): map Grok effort + Kimi reasoning slugs to Cloud API
cursor-grok-4.5-{low,medium,high}[-fast] and kimi-k3-low were falling
back to composer-2.5 against live /v1/models (grok-4.5 + effort,
kimi-k3 + reasoning). Teach resolvePoolModel the mapping, document
when to pick each Grok effort in model-selection, and align plan/work
skills.
2026-08-01 03:32:41 +00:00
Francisco Solla
009bcb732c
Merge pull request #68 from fsolla/cursor/pool-eligibility-triage-df16
fix(agent-pool): fila elegível não zera por falta de `state` no JSON
2026-08-01 00:24:42 -03:00
Cursor Agent
d93a0c361f
fix(agent-pool): include issue state in claim queue JSON
isAutonomousClaimable requires state === OPEN; omitting it from gh
--json made every ready issue look not-open and zeroed the pool queue.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 03:20:27 +00:00
Francisco Solla
08c38f5724
Merge pull request #67 from fsolla/agent/gitignore-playwright-aider
chore — gitignore Playwright + Aider local files
2026-08-01 00:06:23 -03:00
Francisco Ignácio Fontoura Solla
96dc035da2 chore: gitignore Playwright artifacts and Aider local files
Already excluded from ESLint/test-location scans; stop them showing as untracked.
2026-08-01 00:05:00 -03:00
Francisco Solla
8d0b19fbfd
Merge pull request #66 from fsolla/agent/bump-gha-actions-node24
CI — bump actions to Node 24 runtimes
2026-07-31 23:57:24 -03:00
Francisco Ignácio Fontoura Solla
c6baea3375 ci: bump checkout@v5, setup-node@v5, pnpm/action-setup@v6
Silence GHA Node 20 deprecation on action runtimes; inputs unchanged.
2026-07-31 23:56:22 -03:00
Francisco Solla
7347a73eaf
Merge pull request #65 from fsolla/agent/pin-node-24
chore — pin Node 24.x for Vercel/CI parity
2026-07-31 23:54:47 -03:00
Francisco Ignácio Fontoura Solla
2181d30573 chore: pin Node to 24.x (CI, Vercel, engines)
Open engines range forced Vercel onto 22.x despite Project Settings
24.x and warned of auto-major upgrades. Align with CI.
2026-07-31 23:47:49 -03:00
Francisco Solla
bf542b13ab
Merge pull request #64 from fsolla/agent/fix-vercel-cli-version
CI — bump Vercel CLI for gated deploy
2026-07-31 23:44:10 -03:00
Francisco Ignácio Fontoura Solla
27b6bb75ba ci(deploy): bump Vercel CLI to 55 (API requires ≥47.2.2)
Build succeeded; deploy --prebuilt aborted on outdated CLI 41.7.8.
2026-07-31 23:43:07 -03:00
Francisco Solla
6c19489659
Merge pull request #63 from fsolla/agent/fix-vercel-deploy-env
CI — unset test DATABASE_URL for vercel deploy build
2026-07-31 23:33:18 -03:00
Francisco Ignácio Fontoura Solla
183203f1d7 ci(deploy): unset CI test DATABASE_URL before vercel build
Workflow env pointed vercel build at localhost teqo_test; Payload migrate
then ECONNREFUSED. Drop test DB/secret/site URL so pull's production
.env is what the build uses.
2026-07-31 23:32:19 -03:00
Francisco Solla
974d444883
Merge pull request #62 from fsolla/agent/fix-vercel-deploy-pnpm
CI — install pnpm for vercel build deploy
2026-07-31 23:25:19 -03:00
Francisco Ignácio Fontoura Solla
2e873523c8 ci(deploy): install pnpm before vercel build
vercel build shells out to pnpm (packageManager); the deploy job only
had npm, which failed with spawn pnpm ENOENT after auth worked.
2026-07-31 23:24:12 -03:00
Francisco Solla
5d41fbb6cc
Merge pull request #61 from fsolla/agent/fix-vercel-deploy-link
CI — harden Vercel gated deploy
2026-07-31 23:07:42 -03:00
Francisco Ignácio Fontoura Solla
b7bb6f1479 style: prettier CUTOVER-MAIN-ONLY.md 2026-07-31 23:06:40 -03:00
Francisco Ignácio Fontoura Solla
68a4f702fb ci(deploy): harden Vercel gated deploy link
Match the Vercel Actions KB (job-level org/project env, global CLI),
validate team_/prj_ secret shapes, and document the misleading
Project Settings 403. Org/project secrets were resynced from local link.
2026-07-31 23:04:33 -03:00
Francisco Solla
49f2b84782
Merge pull request #60 from fsolla/agent/ci-pr2-main-only
CI2 — main-only + gated deploy + pool 403
2026-07-31 21:16:00 -03:00
Francisco Ignácio Fontoura Solla
6c90d76f10 test: pin exported skip predicates so knip stays clean 2026-07-31 21:09:20 -03:00
Francisco Ignácio Fontoura Solla
2abcaeaaa5 docs: record cutover checklist progress 2026-07-31 20:57:50 -03:00
Francisco Ignácio Fontoura Solla
f021992de0 ci: main-only cutover with gated Vercel deploy
Remove stage/promote/Neon smoke. PR CI targets main; ci.yml full-suite
verifier deploys via vercel CLI and requeues when HEAD moves. Pool uses
POOL_GITHUB_TOKEN and POOL_BASE_REF=main. Docs/skills/rules retargeted.
2026-07-31 20:57:18 -03:00
Francisco Ignácio Fontoura Solla
5237fa9d79 docs(skills): model-selection Composer / Grok / Kimi K3 only
Collapse the canonical table; bipartition for complex issues; drop
K2.7/Haiku/GLM/Gemini from the happy path.
2026-07-31 20:57:18 -03:00
Francisco Ignácio Fontoura Solla
42d1a7be93 ci(pr): prettier + ignore local tool artifacts in format check 2026-07-31 20:57:18 -03:00
Francisco Ignácio Fontoura Solla
9d810d1564 ci(pr): cascade phase1→phase2 with blast-radius skips
Add scope classifiers for code/build jobs, always-on test-location
guardrails, and gate:ci parity. Default affected base is origin/main.
2026-07-31 20:57:18 -03:00
Cursor Agent
503a775b9f fix(cloud): ensure-postgres bootstrap before teqo readiness check
Warm Cloud snapshots often have PostgreSQL online without the teqo
role/DBs. start_postgres previously gated on teqo_ready, exited before
bootstrap_databases, and marked the environment INSTALL_FAILED even
though agents still ran. Also pin DATABASE_URL and assert migrations
in cloud-setup so a silent no-op migrate cannot slip through.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-07-31 20:57:18 -03:00
Cursor Agent
7a876ec334 refactor(notifications): bell loaders read through owner access, no bypass
countUnreadNotifications/loadNotificationList took a caller-supplied
recipientID with module-level admin bypass — one misuse away from reading
someone else's inbox. They now take the actor (CampaignUser) and read
with overrideAccess: false under canReadOwnNotifications, keeping the
explicit recipient filter as a second fence. Pin: owner isolation at the
loader level in campaignNotifications.int.spec.ts.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-07-31 20:57:18 -03:00
Cursor Agent
6705db80eb security: lock public globals update to payloadAdminOnly (Pass 4 P0)
The four public globals (site-settings, home, metadata, privacy-policy)
spelled update access as "any authenticated user" — and campaign JWTs
authenticate against /api/*, so any campaign session (leader included)
could PATCH the public site. payloadAdminOnly matches the collection
lockdown precedent; editors lose config-global writes deliberately
(content editing stays on canManagePublishedContent collections).

Pins: identity + deny (coordinator/editor) + allow (admin fn) + anonymous
read in collectionAccessLockdown.int.spec.ts. Recurrence guard:
globalAccessConventions.unit.spec.ts bans the Boolean(user) shape in
src/globals.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-07-31 20:57:18 -03:00
Cursor Agent
84fed02ee5 test(miss-54): deterministic guard for unsettled goto→goto + nav convention
The SavedFilters incident shape — a page.goto fired while the previous
heavy RSC navigation was still in flight (net::ERR_ABORTED) — gets a
build-level guard: two gotos with no settle between them (await expect /
waitForURL / click / reload / login / catch) fail the suite. Measured
baseline on the current tree: 58 gotos across 17 specs, 0 unsettled
pairs — the six SOFT pairs from the miss audit all settle on awaited
assertions, so the guard starts clean without churning them.

TESTING.md records the convention the miss asked for: goto for cold
loads and URL contracts; in-shell navigation for continuity scenarios;
interactive-state waits before dynamic clicks; a dev-mode caveat for the
campaignLeaderships chip spec (deterministic dev failure at the
suggestion/commit step, prod green — ledgered).
2026-07-31 20:57:18 -03:00
Cursor Agent
5c59793e4c test(miss-53): gate WebAuthn ceremonies on authenticator readiness
The app's biometrics probe is one-shot per island mount: when
isUserVerifyingPlatformAuthenticatorAvailable() resolves before the CDP
virtual authenticator answers, the enrollment form / biometric button
never mount and no wait flips them (prod-build CI flake). New
expectCampaignBiometricsReady(page) polls the platform answer BEFORE the
surface whose island probes it; adopted at both ceremony entries in
campaignWebAuthn (verified green locally). Conventions pin:
e2eNavigationConventions fails the build when a virtual-authenticator
spec skips the readiness gate.
2026-07-31 20:57:18 -03:00
Francisco Ignácio Fontoura Solla
d28ecb831a style: prettier A6-pre dobradinha baseline plan 2026-07-31 20:57:18 -03:00
Francisco Ignácio Fontoura Solla
b1a34a8c3a fix(tests): allocate homeSearch municipalities; scope B42 trend drawer 2026-07-31 20:57:17 -03:00
Cursor Agent
e51a1dc9b2 style: prettier campaignHomeActions after URL anchor edits 2026-07-31 20:57:17 -03:00
Cursor Agent
03314e620a test(miss-73): deterministic allocator guardrails in conventions spec
Recurrence prevention for the deadlock class, three rules:
1. a spec file calling getMunicipality(<arg>) while mutating
   municipalities (assign/touch/create*/payload.update municipality)
   fails the build — the class miss #73 named;
2. hardcoded municipio=<slug> deep links banned in tests/e2e —
   claimMunicipality().slug is the only source;
3. e2e name: /.../ regex literals containing a catalog municipality name
   must be ^-anchored — the literal-regex dodge of the P3-C template
   guard, keyed on the catalog so copy regexes stay untouched.
2026-07-31 20:57:17 -03:00
Cursor Agent
6b894a04c5 test(miss-73): allocate municipalities, never pin seeded slugs (deadlock class)
Int specs pinning seeded rows (cairu/feira-de-santana/catalog[0..2] or
class-derived fixed slugs) and mutating them deadlocked municipality_rels
under the parallel suite (40P01); e2e specs deep-linking ?municipio=cairu
raced the same row from two workers.

- homeSearchStateDeputies: 2 fixed slugs -> 2 allocations.
- municipalityPageData classe test: rewritten class-AGNOSTIC — allocates
  rows until two distinct territorial classes (same pinned behavior:
  filter narrows, totals honest, classe sort = descending weight), no
  fixed reduto/marginal slugs. nivel test + facet test: plain allocations.
- campaignHomeActions/campaignWizardChrome: 11 hardcoded cairu deep links
  -> claimMunicipality(); hit clicks disambiguate by href (catalog names
  are not prefix-unique); caption/URL assertions use ^-anchored full-URL
  regexes (P3-C template guard). /Cairu/i literals gone.

Verified: int 17/17, e2e 18/18 (dev mode), unit 1106/1106.
2026-07-31 20:57:17 -03:00
Francisco Ignácio Fontoura Solla
f27e801e25 docs: restore A6-pre dobradinha baseline plan
Needed by open issue A6-pre; file lived only on a filtered agent branch tip.
2026-07-31 13:49:53 -03:00
Francisco Solla
9e6dd4c061
Merge pull request #9 from fsolla/stage
Promote stage → main (auto)
2026-07-31 13:43:05 -03:00
Francisco Solla
7a66fe4f25
Merge pull request #5 from fsolla/cursor/p4-shared-sheet-host-78a7
Miss #52 guardrail: shared sheet host on the chip-relation lists + fail-loud guard
2026-07-31 13:21:48 -03:00
Francisco Solla
dcaeb4a22a
Merge pull request #3 from fsolla/cursor/p4-script-guard-hardening-78a7
Pass 4 P1: seed-posts missing dieWithLabel import + script/lib guard hardening
2026-07-31 13:21:35 -03:00
Francisco Solla
77fb5384d4
Merge pull request #7 from fsolla/cursor/p4-audit-artifacts-78a7
Pass 4 audit artifacts: plan, ledger reconcile, delivery plan, GUARDRAILS.md
2026-07-31 13:20:40 -03:00
Cursor Agent
836a819074 docs(testing): suite counts truth-up (117 unit / 71 int / 17 e2e, 48 cases) + allocator contract 2026-07-31 13:17:28 -03:00