← Research archive
Technical note published Sep 28, 2026

Private-Safe Image Editing and Deterministic Transformation Routing

KESPA v7.0 introduced a first-class privacy-aware image_edit path after private routing correctly failed closed when no eligible provider could receive the source image. The implementation authorized the local image bridge, added deterministic transparent-background processing, provider fallback strategies, stronger edit lineage/provenance, and safer error handling while keeping control in Admin/brain_config/provider routing and requiring no Brain runtime modification. Production validation remained pending.

image-editing private-data-routing deterministic-transform provider-routing provenance error-handling local-first
MARKDOWN

README.md

7,783 bytes SHA-256 0fff7889c533638a…

KESPA-NOTE-030 — Private-Safe Image Editing and Deterministic Transformation Routing

Summary

KESPA added a first-class image-editing path that preserves private-data routing boundaries while allowing authorized local processing and deterministic image transformations. The implementation grew out of a correctly fail-closed condition: KESPA could recognize a private image-edit request, but no provider was eligible to receive the private source image, so the request stopped with image_edit_private_route_unavailable rather than silently sending the image to an unauthorized processor.

The v7.0 work introduced an explicit image_edit capability, designated the KESPA Local Image Bridge as an authorized local processor for that capability, added deterministic transparent-background handling, introduced provider fallback strategies, improved edit lineage/provenance, and prevented raw internal routing failures from being exposed directly to end users.

This release records the architecture and implementation checkpoint. The supplied source marks the broader v7.0→v7.3 session as Implemented / Pending Production Validation, so this note is published rather than upgraded to verified.

Why this is distinct from KESPA-NOTE-028

KESPA-NOTE-028 documented local-first image generation: generating a new image, routing it through the local image bridge/ComfyUI stack, storing the result as an encrypted artifact, and applying plan-based retention/storage policy.

This note covers a different problem:

``text existing/private image → edit intent → private-data eligibility check → authorized image-edit route → deterministic or provider-backed transformation → lineage/provenance preservation → safe user-facing result/error ``

The key research/engineering boundary is that image editing must not weaken the privacy guarantees already applied to private artifacts.

Fail-closed private routing

The observed failure mode was:

``text image_edit_private_route_unavailable ``

That condition represented correct privacy behavior rather than a reason to bypass the routing policy. KESPA had identified an image-edit request involving private image data but did not have a route authorized to receive that data.

The implementation response was to create an explicit capability and eligibility path rather than treating image editing as generic image generation or allowing private content to flow to any configured external provider.

First-class image_edit capability

Image editing is now represented as its own provider capability.

Conceptually:

``text user requests edit → orchestration classifies image_edit → source image privacy/scope is evaluated → provider routes are filtered for image_edit eligibility → authorized route is selected → transformation executes → result is retained with lineage/provenance ``

This preserves the larger KESPA provider model: processors are replaceable and route eligibility is controlled by the application/control plane rather than by weakening the durable privacy boundary.

Authorized local image processing

The KESPA Local Image Bridge was explicitly trusted/authorized for private image-edit processing.

That matters because the local bridge is under KESPA/NexLabs control and can process source-image data without requiring that private evidence be sent to an unrelated public provider.

The source does not establish that every future external image provider is private-data eligible. Eligibility remains route/provider policy rather than an assumption created merely because a provider is configured.

Deterministic transparent-background transformation

The v7.0 implementation also added deterministic transparent-background processing.

This is important because not every image transformation needs a generative model. For transformations that can be performed deterministically, KESPA can avoid unnecessary model/provider dependence while producing a predictable operation over the source image.

The source specifically identifies transparent-background processing as one such deterministic path. It does not provide benchmark measurements for accuracy, edge quality, latency, or general segmentation performance, so no such metrics are claimed here.

Provider fallback

Provider fallback strategies were added for image editing so the capability is not tied to one hardcoded implementation.

The release preserves the following boundary:

  • capability routing is controlled by Admin / brain_config / provider-routing data,
  • private-data eligibility is checked before a route may receive private image content,
  • an unavailable eligible route should fail closed rather than silently degrade privacy,
  • additional providers may be used only when they satisfy the configured capability and privacy rules.

The supplied source does not enumerate a production-tested fallback matrix, so this package does not claim that every fallback path has been validated in production.

Lineage and provenance

Image edits now preserve stronger lineage/provenance semantics.

An edited result should remain attributable to its source image and transformation path rather than appearing as an unrelated new artifact. This supports later auditability, evidence handling, regeneration/re-edit workflows, and user-facing provenance.

The source establishes that lineage/provenance handling was improved, but it does not provide a complete public schema for every lineage field. This release therefore records the capability without inventing undocumented fields.

Error handling

The implementation also prevents raw internal image-routing errors from leaking directly to the user.

Internal failures such as provider eligibility/routing problems remain operational diagnostics, while user-visible behavior is handled through the orchestration/error layer. This keeps internal architecture details from becoming accidental public error messages and separates diagnosable system state from end-user messaging.

Control-plane ownership

The source explicitly states:

  • control plane: Admin / brain_config / provider routing database,
  • Brain runtime modification: none required for this work.

That matches the broader KESPA architecture rule that policy, provider eligibility, routing, and tunable behavior should be controlled outside the locked Brain runtime whenever practical.

Current publication status

Recorded implementation state:

``text Release range: v7.0 → v7.3 Image-edit implementation: v7.0 Overall session status: Implemented / Pending Production Validation Brain runtime modification: none required ``

For that reason, this technical note is classified as published, not verified.

Limitations and non-claims

This release does not claim:

  • production validation of every image-edit path,
  • benchmarked edit quality,
  • benchmarked transparent-background quality,
  • universal support for arbitrary image transformations,
  • production validation of every configured fallback provider,
  • authorization for every external provider to receive private image data,
  • any specific image-edit latency or throughput,
  • that deterministic transparent-background processing replaces generative editing generally,
  • that the Brain runtime was modified to implement the feature.

Engineering result

The central result is architectural: KESPA now treats image editing as a distinct, privacy-aware capability with provider eligibility, local trusted processing, deterministic transformations where appropriate, provenance/lineage, and safer error handling. The implementation closes the earlier gap without weakening the private-artifact boundary or making brain_api.py the policy control point.

TEXT

SHA256SUMS.txt

393 bytes SHA-256 e57011d05e51d44d…
0fff7889c533638ab4d8a5786789ebf8e2d38ff2f72c01179d4a9223527c645a  README.md
d41ed115bf3c966221848f3e8aadf1482636fe99bd1425306e3df36888c91ac5  note.json
5c560a5dbcd4e4d0cd11af9586c5e255f1a8700354a8978829ba2adfc20747af  metrics.csv
a28a6486c9d75063e36e6f68044f67a7fb28b02978b96e05bf11801b67181a33  methodology.md
ebfffea3c038575259743f4e1e33d67062e71c5150a93382dd3ca32b9cfe7cff  provenance.json
MARKDOWN

methodology.md

2,898 bytes SHA-256 a28a6486c9d75063…

Methodology — KESPA-NOTE-030

Source basis

This technical note was prepared only from the supplied KESPA v7.0→v7.3 Jira/session summary provided on 2026-09-28. The source identifies two major capabilities from the session; this release isolates the image-editing portion as a distinct public research/engineering record.

No external source was used to fill implementation gaps or upgrade validation state.

Inclusion rule

Included facts are limited to the image-edit architecture explicitly stated in the supplied source:

  • a private image-edit request previously failed closed with image_edit_private_route_unavailable,
  • a first-class image_edit capability was added,
  • the KESPA Local Image Bridge was explicitly trusted/authorized,
  • deterministic transparent-background processing was added,
  • provider fallback strategies were introduced,
  • private image data protections were preserved,
  • lineage/provenance was improved,
  • raw internal errors were prevented from leaking to users,
  • control remained in Admin / brain_config / provider-routing data,
  • no Brain runtime modification was required.

Separation from rewrite work

The same source also describes a v7.1→v7.3 rewrite/proofreading/formatting orchestration system. That is intentionally excluded from this artifact because it represents a separate request class, routing contract, and orchestration problem and should be documented independently rather than merged into an image-processing note.

Deduplication boundary

This note is also intentionally distinct from KESPA-NOTE-028. NOTE-028 records local-first image generation, encrypted generated-image retention, and storage routing. NOTE-030 records editing of an existing/private image, private-provider eligibility, deterministic transformation paths, edit provenance, and fail-closed routing.

Status interpretation

The supplied issue status is Implemented / Pending Production Validation.

Accordingly this public release uses status published, not verified. The package records implemented architecture but does not claim complete production validation of every image-edit transformation or fallback path.

Measurement integrity

No quality, latency, throughput, success-rate, segmentation-accuracy, or provider-fallback benchmark numbers were supplied for the image-edit work. None are inferred or invented.

The literal internal failure identifier is retained because it is part of the supplied architectural evidence. No raw stack traces, internal error bodies, secrets, tokens, private images, or credentials are included.

Privacy boundary

The public artifact documents that provider eligibility exists for private image data, but it does not publish private source images or any customer/user artifact. The note intentionally does not assume all configured external providers are authorized for private processing.

CSV

metrics.csv

1,616 bytes SHA-256 5c560a5dbcd4e4d0…
metric,value,unit,status,source_type,notes
release_start,v7.0,version,recorded,direct,Session release range begins at v7.0.
release_final,v7.3,version,recorded,direct,Final session iteration.
image_edit_implementation_iteration,v7.0,version,recorded,direct,Source identifies the image-edit work as completed in v7.0.
first_class_image_edit_capability,True,boolean,recorded,direct,A real image_edit capability was added.
private_route_failure_observed,image_edit_private_route_unavailable,state,recorded,direct,Fail-closed condition that motivated the routing work.
local_image_bridge_authorized_for_private_editing,True,boolean,recorded,direct,KESPA Local Image Bridge was explicitly trusted for the private image-edit path.
deterministic_transparent_background_transform,True,boolean,recorded,direct,Deterministic transparent-background processing was added.
provider_fallback_strategies_added,True,boolean,recorded,direct,Fallback strategies were added; the source does not provide a fully validated production matrix.
lineage_provenance_improved,True,boolean,recorded,direct,Image-edit lineage/provenance was improved.
raw_internal_error_exposure_prevented,True,boolean,recorded,direct,Raw internal errors are prevented from leaking directly to users.
brain_runtime_modified,False,boolean,recorded,direct,No Brain runtime modification was required for this work.
production_validation_complete,False,boolean,boundary,direct,Issue status is Implemented / Pending Production Validation.
image_edit_quality_benchmark_available,False,boolean,boundary,direct,No image-edit quality benchmark is supplied in the source.
JSON

note.json

1,690 bytes SHA-256 d41ed115bf3c9662…
{
    "id": "KESPA-NOTE-030",
    "type": "technical_note",
    "title": "Private-Safe Image Editing and Deterministic Transformation Routing",
    "date": "2026-09-28",
    "status": "published",
    "summary": "KESPA v7.0 introduced a first-class privacy-aware image_edit capability after the system correctly failed closed when no provider was authorized to receive private image data. The implementation explicitly authorized the local image bridge, added deterministic transparent-background processing, provider fallback strategies, stronger edit lineage/provenance, and safer user-facing error handling, all through the Admin/brain_config/provider-routing control plane without requiring a Brain runtime modification. Production validation remained pending in the supplied source.",
    "release_range": "v7.0-v7.3",
    "final_iteration": "v7.3",
    "image_edit_iteration": "v7.0",
    "control_plane": [
        "Admin",
        "brain_config",
        "provider routing database"
    ],
    "brain_runtime_modified": false,
    "implementation_state": "Implemented / Pending Production Validation",
    "observed_fail_closed_error": "image_edit_private_route_unavailable",
    "capabilities": {
        "first_class_image_edit": true,
        "private_route_eligibility": true,
        "local_image_bridge_authorized": true,
        "deterministic_transparent_background": true,
        "provider_fallback_strategies": true,
        "lineage_provenance_improved": true,
        "raw_internal_error_leak_prevention": true
    },
    "production_validation_complete": false,
    "tags": [
        "image-editing",
        "private-data-routing",
        "deterministic-transform",
        "provider-routing",
        "provenance",
        "error-handling",
        "local-first"
    ]
}
JSON

provenance.json

2,532 bytes SHA-256 ebfffea3c0385752…
{
    "schema": "kespa.public_research_provenance.v1",
    "release_id": "KESPA-NOTE-030",
    "source_material": [
        {
            "kind": "engineering_update",
            "description": "KESPA v7.0-v7.3 feature/Jira summary supplied by the project owner on 2026-09-28."
        }
    ],
    "directly_recorded_facts": [
        "The session release range was v7.0 through v7.3, with v7.3 the final iteration.",
        "The image work was completed in v7.0.",
        "A private image-edit request could fail with image_edit_private_route_unavailable when no provider was authorized to receive private image data.",
        "A first-class image_edit capability was added.",
        "The KESPA Local Image Bridge was explicitly trusted for the image-edit path.",
        "Deterministic transparent-background processing was added.",
        "Provider fallback strategies were added.",
        "Private image-data protections were preserved.",
        "Image-edit lineage/provenance was improved.",
        "Raw internal errors were prevented from leaking to users.",
        "The control plane remained Admin / brain_config / provider routing database.",
        "No Brain runtime modification was required for this work.",
        "The issue status was Implemented / Pending Production Validation."
    ],
    "derived_values": [],
    "validation_boundary": [
        "Production validation remained pending in the supplied source.",
        "No image-edit quality, segmentation quality, latency, throughput, or reliability benchmark was supplied.",
        "No complete production-tested provider-fallback matrix was supplied.",
        "The source does not establish that every external provider is eligible to receive private image data.",
        "Deterministic transparent-background processing is one transformation path and is not evidence of general deterministic image editing."
    ],
    "deduplication": {
        "related_prior_records": [
            "KESPA-NOTE-028"
        ],
        "distinct_scope": "KESPA-NOTE-028 covers generation of new images and generated-image retention/storage. This release covers editing an existing/private image, private-data route eligibility, deterministic transformation handling, fallback, edit lineage/provenance, and safe error behavior."
    },
    "publication_exclusions": [
        "private source images",
        "private user or organization data",
        "credentials, API keys, bearer tokens, cookies, or sessions",
        "raw internal error bodies and stack traces",
        "undocumented provider-routing implementation details",
        "unsupported claims of production validation or image-edit quality"
    ]
}