Skip to content

fix(platform): synchronize external task lifecycles - #4395

Merged
yannickmonney merged 2 commits into
mainfrom
fix/external-task-status-sync
Oct 6, 2026
Merged

yannickmonney merged 2 commits into
mainfrom
fix/external-task-status-sync

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Custom external tasks currently mirror only open/closed intake state, which can park an accepted business completion in In Review and drift from its source. Add generic source-approved lifecycle projection and source-declared task action forms: a verified native user submits complete transition input, including verification within the same board column, and the source validates every business rule. A separate prerequisite commit provides private-repository agents with OpenSSH/netcat and their actual session owner's Git identity when no GitHub connector is granted, preserving Member secret withholding.

Status and archival compare-and-swap, immutable request/decision history, source lifecycle ordering and exact custom-reference binding cover concurrent moves, stale forms and lost replies. Native agent reviews remain enforced. Existing consumers retain their intake behavior until explicitly opted into source projection. The additive migrations are 0151 and 0152; the API contract becomes 3.16.0.

Checklist

  • bun run check passes with the repo-pinned Bun 1.4.2: 49/49 tasks green (45 valid cached tasks); the final CLI run executes 2,413 tests without failures.
  • bun run lint:sast passes (Opengrep); staged-file SAST also passes for the final fixture correction.
  • Translations updated in messages/{en,de,fr}.yml; shared UI and de-CH changes are N/A because the reused controls add no catalog strings.
  • Docs updated in docs/{en,de,fr}/ for the API, task actions and repository access.
  • Root README.md / README.de.md / README.fr.md: N/A, installation and the top-level guide are unchanged. The sandbox runtime README documents its new SSH tooling and proxy use.

Test plan

Validation: the final source passed 1,600 authenticated HTTP/Postgres/S3 checks across all 233 lanes with ITEST_REQUIRE_ALL_LANES=1, using the production Node 22.21.1. This actually exercises complete same-column forms, strict native session provenance, declared fields, source/native races, lost replies, one pending request, immutable decisions, delayed older acknowledgments and archived reopen. The complete ARM64 sandbox runtime built from this source passed the real offline SSH-agent/stdin-key/HTTP CONNECT probes as both UID 65534 and UID 10001.

Also verified: native forms in Chromium (4 tests, including EN/DE/FR, keyboard interaction and narrow layouts), source-boundary tests (10), focused API/SSH/OpenAPI tests (156), native actor/immutable-decision/ordinary-activity regression tests, Member credential-withholding tests (4), and the SSH image harness (50). The full platform server suite passed 82,287 tests and the platform UI suite passed 6,087 tests. Type checks, Knip, SAST and manual-suite references pass. React Doctor's remaining findings are established underscore filenames, intentional HTTP error-body assertions and ordered same-task replay tests; there are no React form findings.

The authenticated HTTP/Postgres source-form lane and baked SSH sandbox probe are registered in the existing Backend integration and Build image-test jobs. Required ready-PR hosted checks, including the actual full integration run and sandbox image probes, must pass before merge; the exact-main candidate and release gates still apply before rollout.

@yannickmonney
yannickmonney marked this pull request as ready for review October 5, 2026 19:55
@yannickmonney
yannickmonney merged commit a2dbe4c into main Oct 6, 2026
@yannickmonney
yannickmonney deleted the fix/external-task-status-sync branch October 6, 2026 04:37

@yannickmonney yannickmonney left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Post-merge review of #4395, Track B (DATA, security boundary, API contract, CI/CD): no blocking finding. One process note on how it shipped.

  • Commits: the merge is a2dbe4c41c88a817889feb70004ad160c4543dfb (parent 464e1d9b7); the PR head is e493b14011a29780df4998aaa808e773bafb0b63. It shipped in v0.5.74 (the tag points to 890de6258, which contains the merge), and production serves 0.5.74 as of 08:19Z.
  • Reviewer: TALE-361 Review B, agent #4 (5f5307c9), run dddbb025.
  • Method: coordination-class only (GitHub API, single-file git show, the CI job log). I ran nothing locally: admission was pressured (score 1.06), and no heavy-phase reservation is available.

DATA: PASS

  • Both migrations are additive:
    • 0151_task_external_status.sql and 0152_task_external_status_requests.sql only run CREATE TABLE … IF NOT EXISTS and CREATE INDEX IF NOT EXISTS.
    • Each new table has a cascading foreign key to app.tasks and bounded CHECK constraints. Neither backfills.
    • The previous image ignores both tables, so an image rollback stays safe.
  • Real PostgreSQL proof from CI: Backend integration job 112107734404 (run 37366473977, attempt 2) passed 1,600 of 1,600 checks across 233 lanes, including 21 external-status checks.
  • Operational note: creating each foreign key briefly takes a SHARE ROW EXCLUSIVE lock on app.tasks, which waits behind open writes. I didn't check whether the migration runner sets a lock_timeout.

Security boundary of the new lane: PASS (static review, plus CI)

  • The task row is read organization-scoped and FOR UPDATE, and assertTaskWorkable applies.
  • It requires the task's exact custom external reference. GitHub, GlitchTip and imported issues are refused.
  • A captured native agent review blocks the projection with 409 TASK_AGENT_REVIEW_REQUIRED.
  • A pending human review is withdrawn as rejected, without recording an approver. That is TASK-R15, documented in the spec and held by a test.
  • Stale and same-time conflicting source lifecycles are refused, request decisions are immutable, and the transactions are serializable.
  • CI shows the boundary checks passing: a wrong binding gets 409, a wrong path 404, and a foreign task TASK_NOT_FOUND.

API contract: PASS (3.15.0 → 3.16.0, additive as claimed)

  • Operations went from 139 to 141: PUT /api/v1/projects/{id}/tasks/{taskId}/external-status and GET …/status were added, and none was removed.
  • No existing operation gained a required request field.
  • Schemas went from 65 to 68, with none removed and no property lost.
  • Not checked: enum narrowing or type changes inside existing properties.

CI/CD and workflow

  • At the head, Checks went green on attempt 2 after a red attempt 1.
  • The PR was merged by the shared account with 0 reviews, and it shipped in v0.5.74.

Not reviewed (NOT_RUN):

  • the code quality of external-status.ts (632 lines) and the new task card;
  • the Part A topics;
  • the performance of the two new endpoints.

yannickmonney added a commit that referenced this pull request Oct 8, 2026
Every harness, browser and vision stage was built FROM tooling-base, the
one chain that also held the OS packages, Office, TeX, the document
libraries, the Docker engine and the Claude Code environment defaults, and
a guard required it. Any edit there (two apt packages for #4395, the sharp
security bump in #4450, an ENV tweak) re-ran every harness install and
could re-ship ~2 GB of layers to every host.

- harness-base (Python slim + Node + download tools) now builds the
  harnesses, the browser and the document Node libraries; the document
  Python libraries install into their own prefix, Hermes builds on them,
  and all of these arrive in the runtime stage as `COPY --link` layers.
- The OS chain runs from the largest, stablest apt set to the most often
  extended (fonts and browser libraries, Office, TeX, the Docker engine,
  then the everyday tools), and its environment variables moved to the
  runtime stage, below every install.
- The guard now requires that no stage but the runtime reaches the OS
  chain, that the OS chain holds no ENV and keeps its apt order, and that
  the document libraries ship as layers of their own.

Every stage, and the full runtime image including the Playwright MCP
manifest recording, was built locally (arm64).
yannickmonney added a commit that referenced this pull request Oct 9, 2026
Every harness, browser and vision stage was built FROM tooling-base, the
one chain that also held the OS packages, Office, TeX, the document
libraries, the Docker engine and the Claude Code environment defaults, and
a guard required it. Any edit there (two apt packages for #4395, the sharp
security bump in #4450, an ENV tweak) re-ran every harness install and
could re-ship ~2 GB of layers to every host.

- harness-base (Python slim + Node + download tools) now builds the
  harnesses, the browser and the document Node libraries; the document
  Python libraries install into their own prefix, Hermes builds on them,
  and all of these arrive in the runtime stage as `COPY --link` layers.
- The OS chain runs from the largest, stablest apt set to the most often
  extended (fonts and browser libraries, Office, TeX, the Docker engine,
  then the everyday tools), and its environment variables moved to the
  runtime stage, below every install.
- The guard now requires that no stage but the runtime reaches the OS
  chain, that the OS chain holds no ENV and keeps its apt order, and that
  the document libraries ship as layers of their own.

Every stage, and the full runtime image including the Playwright MCP
manifest recording, was built locally (arm64).
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