Summary
A hosted record with unparseable frontmatter cannot be repaired through an otherwise authorized type-scoped application. Exact-record authorization correctly fails closed because Connect cannot prove the record's current type, but there is no sufficiently narrow repair path for the application that encounters the record.
This can leave user-owned data operationally stranded: the record exists, but ordinary clients cannot fix the syntax that prevents its classification.
This is related to, but distinct from:
Reproduction
-
Create a valid hosted record belonging to a type available to a type-scoped application.
-
Cause the hosted exact record to contain unparseable YAML frontmatter (for example through a legacy/import/mirror path):
-
Attempt an ordinary scoped update that repairs the frontmatter.
-
Observe scope_classification_unavailable or scope_denied before the repair can be applied.
The #359 candidate regression intentionally confirms this fail-closed behavior, but it does not provide a recovery path.
Required security invariant
Connect must not authorize an unrestricted ordinary update based only on a proposed after-image. Otherwise an application could target an unrelated malformed record and rewrite it into one of its own allowed types.
At the same time, fail-closed authorization should not mean permanent loss of repair access for collection-owned data.
Expected behavior
Provide a narrowly authorized recovery mechanism that:
- Does not expose malformed record contents to an application that lacked prior authority.
- Binds repair authority to trusted prior evidence, an explicit collection-owner capability, or another non-forgeable authorization fact.
- Canonically classifies and validates the complete proposed after-image.
- Commits only when the repaired after-image is within the authorized scope.
- Rejects atomically, preserving the original bytes and revision, when repair validation or authorization fails.
- Produces actionable diagnostics so clients can distinguish “repair required” from an ordinary scope denial.
The exact mechanism needs authorization-boundary design; possibilities include a dedicated repair operation/capability or reuse of trusted last-complete classification where that evidence is cryptographically and transactionally bound.
Regression coverage
Add hosted-provider integration coverage for:
- authorized repair of an existing malformed-frontmatter record;
- denial when an unrelated scoped application attempts to claim the record by changing its type;
- denial when the repaired after-image remains malformed or outside scope;
- byte/revision preservation after rejected repairs;
- successful ordinary updates after repair;
- behavior when no trustworthy prior classification exists;
- records created by legacy/import/mirror paths rather than only structured operation input.
Product impact
Plain-text records are routinely edited incrementally and may arrive from older clients, imports, sync, or manual filesystem changes. Intake prevention is valuable, but it cannot replace a safe recovery path for malformed records that already exist.
Summary
A hosted record with unparseable frontmatter cannot be repaired through an otherwise authorized type-scoped application. Exact-record authorization correctly fails closed because Connect cannot prove the record's current type, but there is no sufficiently narrow repair path for the application that encounters the record.
This can leave user-owned data operationally stranded: the record exists, but ordinary clients cannot fix the syntax that prevents its classification.
This is related to, but distinct from:
Reproduction
Create a valid hosted record belonging to a type available to a type-scoped application.
Cause the hosted exact record to contain unparseable YAML frontmatter (for example through a legacy/import/mirror path):
Attempt an ordinary scoped update that repairs the frontmatter.
Observe
scope_classification_unavailableorscope_deniedbefore the repair can be applied.The #359 candidate regression intentionally confirms this fail-closed behavior, but it does not provide a recovery path.
Required security invariant
Connect must not authorize an unrestricted ordinary update based only on a proposed after-image. Otherwise an application could target an unrelated malformed record and rewrite it into one of its own allowed types.
At the same time, fail-closed authorization should not mean permanent loss of repair access for collection-owned data.
Expected behavior
Provide a narrowly authorized recovery mechanism that:
The exact mechanism needs authorization-boundary design; possibilities include a dedicated repair operation/capability or reuse of trusted last-complete classification where that evidence is cryptographically and transactionally bound.
Regression coverage
Add hosted-provider integration coverage for:
Product impact
Plain-text records are routinely edited incrementally and may arrive from older clients, imports, sync, or manual filesystem changes. Intake prevention is valuable, but it cannot replace a safe recovery path for malformed records that already exist.