GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(backup): sign_upload signs envelopes every store refuses — mirror validate_envelope at sign time (gap from #6488) · Issue #8842 · developing-today/code

id(backup): sign_upload signs envelopes every store refuses — mirror validate_envelope at sign time (gap from #6488) #8842

New issue
Copy link
New issue
Copy link
Closed
#10916
Closed
id(backup): sign_upload signs envelopes every store refuses — mirror validate_envelope at sign time (gap from #6488)#8842
#10916
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)status:done

Description

@dezren39
dezren39
opened on Nov 12, 2026
Issue body actions

Gap found by the Phase 4 sign-surface inventory (#6488, contract #6487)

Signer: sign_upload — pkgs/id/src/backup.rs:129
pub fn sign_upload(signing_key: &SigningKey, envelope: &[u8], epoch: u64) -> [u8; 64]

Receipt rule it does not mirror: BackupStore::upload (pkgs/id/src/backup.rs:558) unconditionally calls validate_envelope(envelope)? (pkgs/id/src/backup.rs:475) before it verifies the signature — a malformed envelope (bad magic, unsupported KDF, out-of-range KDF parameters, truncated header) is refused at receipt no matter who signed it.

Why it is decidable at the seam: the rule is class (a) intrinsic under the #6487 contract — it depends only on the envelope bytes the signer already holds. validate_envelope is a private function in the same module (backup.rs:475), so the signer could call it today; the blocker is the shape, not the information: sign_upload is infallible (-> [u8; 64]), so it cannot refuse without an API change (the same shape directory_auth::sign_request had before #6443 made it fallible).

Effect today: a client can produce a valid signature over an envelope every backup store will refuse — creation reports success, consumption silently ignores, the exact failure shape #6487 exists to remove. All current in-repo callers are tests in backup.rs itself, so the API change is contained.

Not part of this filing: the epoch rules at receipt (StaleEpoch, Tombstoned) are class (d) receiver-state — they depend on the store's current record, which the signer cannot know. Those stay receipt-only.

Acceptance

  • sign_upload refuses a malformed envelope (one validate_envelope rejects) before signing, with an error naming the envelope rule — or the seam is changed to a validated-envelope type that makes the same refusal structural.
  • The envelope predicate stays defined once and is used by both the signer and BackupStore::upload, so the two cannot drift.
  • Valid envelopes sign exactly as before; the existing backup test suite stays green, plus a new test that a malformed envelope is refused at sign time.
  • Receipt behaviour is unchanged.

Filed from the #6488 Phase 4 inventory (task 15067, lane code-a). Do not fix inside #6488 — that phase is inventory and documentation only.

Activity

  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 12, 2026
  2. developing-today commented on Nov 12, 2026

    @developing-today
    developing-todayBot
    on Nov 12, 2026 – with developing.today
    Contributor
    More actions

    CODE-2665

  3. github-actions
    assigned
    dezren39
    on Nov 12, 2026
  4. developing-today
    added
    status:in-review
    on Nov 17, 2026
  5. dezren39
    closed this as completedin 8691b97on Nov 17, 2026
  6. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 17, 2026
  7. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    🤖 Agent note · already done (verified) — task 18753 (lane code-e, bulk-intake triage)

    • Issue id(backup): sign_upload signs envelopes every store refuses — mirror validate_envelope at sign time (gap from #6488) #8842 is CLOSED with status:done, and the fix is verified on origin/main today: sign_upload (pkgs/id/src/backup.rs:142) is now fallible — it calls validate_envelope(envelope)? before signing and returns BackupError::MalformedEnvelope for a malformed envelope, mirroring the receipt rule in BackupStore::upload with the predicate defined once for both sides. The regression test sign_upload_refuses_malformed_envelopes_at_sign_time (backup.rs:923) is present, with the old infallible shape kept only as a test helper (sign_upload_unchecked, :914). Receipt behaviour and the epoch rules (receipt-only, class (d)) are unchanged, per the acceptance list.
    • This duplicate triage completes as already_done; no follow-on is owed.
  8. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    Triage verdict — queue task 20224, lane any-g: already done, verified on current main

    Issue #8842 is CLOSED (status:done), and the fix is present and verifiable in the tree today:

    • PR fix(id): sign_upload refuses envelopes every backup store refuses #10916 "fix(id): sign_upload refuses envelopes every backup store refuses" merged.
    • pkgs/id/src/backup.rs:142 — sign_upload is now fallible (-> Result<[u8; 64], BackupError>) and calls validate_envelope(envelope)? before signing (line 147), the same single predicate BackupStore::upload uses at receipt.
    • pkgs/id/src/backup.rs:923 — test sign_upload_refuses_malformed_envelopes_at_sign_time covers the refusal, and asserts valid envelopes sign byte-identically to the pre-fix unchecked helper (lines 927-928), so valid-envelope behavior is unchanged.

    Every acceptance box on this issue is satisfied by landed code; no follow-on packet is needed. This triage closes as already_done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)status:done

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.