Skip to content

Write a daily-brief project id only when it is a uuid - #572

Draft
samrusani wants to merge 1 commit into
mainfrom
cursor/daily-brief-project-id-a34e
Draft

samrusani wants to merge 1 commit into
mainfrom
cursor/daily-brief-project-id-a34e

Conversation

@samrusani

@samrusani samrusani commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Published draft head b3af781efa46b47b5fc118e2912eb64db36b2816 has 22 successful GitHub checks in the exact-head snapshot observed at 2026-10-06T00:48:16.326311+00:00. All nine final draft heads are green in that same snapshot.

Final combined root 89e13def51b508ce42155d7dcad9a310e7b95fbb has 13,858 passing unit cases and 20 skips through the recorded complete corrective shards. Global statement-plus-branch coverage is 85.619226%; one aggregate statement gate across 14 API paths reaches 71.538857% (4170/5829), above its 45% floor. The source-equivalent CI migration model passes 669 PostgreSQL cases with one intentional skip; static, Bandit, LongMemEval, actual upgrade/restore and all 20 strict concurrency suites pass within their recorded heads. Capture and relabel budgets pass at their measured head with verified unchanged final source paths. These combined receipts are distinct from each historical local worker selection below.

The only restricted-owner full PostgreSQL failure is unchanged historical migration 0067; current 0096 retains restricted owner controls and the actual CI migration model passes. Designated control-tower merge approval and owner/security-team approval before the tag are external gates. Earlier force-push variance and the missing original standalone kernel-main proof remain disclosed; no release, deployment or second full independent scan is claimed.

A daily brief with open-loop discovery wrote the single project string into open_loops.project_id. On Postgres that column is uuid, so a source scoped with a free-form name and a TODO line aborted the brief. The name now stays in metadata_json.project_scope. project_id is set only when that single entry is a uuid. The roadmap records the same limit.

On main, tests/integration/test_daily_brief_project_id_postgres.py fails with psycopg.errors.InvalidTextRepresentation: invalid input syntax for type uuid: "Alice".

A uuid that is not a row in projects still fails the foreign key. This change does not look the id up.

Historical validation

tests/unit/test_daily_brief_project_id.py: 1 passed.

tests/integration/test_daily_brief_project_id_postgres.py on disposable PostgreSQL 16: 1 passed.

tests/unit/test_control_docs_agree_on_the_release_baseline.py and tests/unit/test_control_doc_truth.py: 113 passed.

Killing mutation, reverted before this commit: _stored_open_loop_project_id returned project_scope[0] for a one-item scope. test_a_free_form_name_is_not_a_stored_project_id failed (assert 'Alice' is None). test_daily_brief_keeps_a_free_form_project_out_of_the_uuid_column failed with invalid input syntax for type uuid: "Alice". The file was restored byte for byte.

Not run: the full tests/unit suite, Bandit, and mypy.

Reproduction and executed mutations

The original reproduction and named mutation results are retained in the validation section above. Later remediation evidence must identify its exact tested head and distinguish actual executions from suggested mutations.

Current validation and executed mutations

These are synthetic local checks of the named worker checkout. They do not establish the final combined candidate, live CI, merge approval or release approval. The command spelling below uses python; private receipts retain the interpreter and environment.

Exact side head is b3af781efa46b47b5fc118e2912eb64db36b2816. Frozen main 48873b038013f4cf548099fcc4610a150972eedd executes the real PostgreSQL daily-brief case and fails with UUID InvalidTextRepresentation for the free-form project. The unchanged integration test is copied into the isolated frozen-main checkout before executing:

PYTHONPATH=apps/api/src python -m pytest tests/integration/test_daily_brief_project_id_postgres.py -q --require-executed-tests
FAILED test_daily_brief_keeps_a_free_form_project_out_of_the_uuid_column
InvalidTextRepresentation: invalid input syntax for type uuid: "Alice"
1 failed in 2.85s

The same guard was removed once and killed independently by unit and real PostgreSQL cases, then restored byte for byte. These are two executions of one physical mutation.

Executed mutation Named failing test
single_project_bypasses_uuid_validation tests/unit/test_daily_brief_project_id.py::test_a_free_form_name_is_not_a_stored_project_id
single_project_bypasses_uuid_validation tests/integration/test_daily_brief_project_id_postgres.py::test_daily_brief_keeps_a_free_form_project_out_of_the_uuid_column

At the side head, 281 docs tests, release controls, Ruff, mypy on 273 files and Bandit passed. The PostgreSQL selection initially had 26 passes and eight role-bootstrap failures; a lifecycle-only setup correction reran the eight cases successfully without elevating the table owner or application role. The completed full unit run recorded 13,172 passes, 154 failures, 20 skips and 10 errors; the exact 164 failed or errored cases then passed on the bounded permission-enabled retry in 77.96 seconds. Coverage is 85.56 percent and the module floor check passed. This is the original full run followed by a targeted retry, rather than one clean full invocation. LongMemEval initially recorded 214 passes and two socket-bind permission failures, then the full rerun passed all 216 cases and its evidence check. No full-suite green claim is made.

Tested head and remaining gates

The final publication head is b3af781efa46b47b5fc118e2912eb64db36b2816. The saved original PR snapshot b3af781efa46b47b5fc118e2912eb64db36b2816 remains historical. All tests use synthetic fixtures; no live vault or production database is asserted. The final exact-head GitHub CI snapshot is verified above. The final combined validation, bounded M1-M58 reconciliation, measured source mapping and scoped execution/skeptic evidence are separately recorded above. Designated outside approvals are not issued by this work. Merge, the dedicated release tag, the owner's security-team review before the tag and advisory publication remain separate gates.

Upgrade Overview

Protected Areas

  • memory schema
  • evidence pipeline
  • trust rules
  • promotion logic
  • continuity APIs

The checked areas cover the complete cumulative diff of this exact published head against the frozen release base.

Compatibility Impact

A free-form project name remains in metadata instead of the PostgreSQL UUID mirror. A valid existing project UUID retains the prior behavior; a nonexistent UUID still fails its foreign key.

Migration / Rollout

No migration is required. This independent change is included in the frozen nine-PR release candidate and needs combined verification.

Operator Action

No manual action is required. Free-form project names stay in metadata_json.project_scope.

Validation

Earlier worker commands retain their actual tested revisions and limits. Final exact-head remote CI and the source-equivalent combined acceptance are separately established in the current summary; they do not backdate the historical local receipts. Designated control-tower merge approval and owner/security-team release approval remain external gates. Historical process and evidence limits remain disclosed.

Rollback

Revert the writer change. The previous UUID crash returns for a free-form project; no stored rows are rewritten by this change.

Process variance

The existing review branch name is preserved. It differs from the handoff naming convention. Earlier updates to #565 through #569 used identity-only force-pushes and violated the mandatory no-force-push rule; preserving source trees did not make them compliant. This historical violation cannot be erased by later tests. Further updates use ordinary commits and plain merges. The handoff contains a later rebase sentence that contradicts its mandatory plain-merge rule; the mandatory rule governs.

A free-form project name stays in metadata_json.project_scope. v0.20.0 wrote that name into open_loops.project_id and the brief failed on Postgres.

This branch has not been deployed

No deployments
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