Skip to content

use single letter for keys dump()#14

Closed
Bilb wants to merge 1 commit into
session-foundation:devfrom
Bilb:feat-make-key-dump-single-letters
Closed

use single letter for keys dump()#14
Bilb wants to merge 1 commit into
session-foundation:devfrom
Bilb:feat-make-key-dump-single-letters

Conversation

@Bilb

@Bilb Bilb commented Dec 17, 2024

Copy link
Copy Markdown
Collaborator

cherry picked from #12

Fixed the debian/sid build at #15

@Bilb Bilb closed this Dec 19, 2024
@Bilb
Bilb deleted the feat-make-key-dump-single-letters branch December 19, 2024 02:32
jagerman added a commit to jagerman/libsession-util that referenced this pull request Jul 22, 2026
…tion#14)

Parse the closed `plan` grammar (pro-wire-protocol.md §1 / Delta session-foundation#14) in
libsession rather than handing clients the raw wire code to reinterpret.
get-details items now carry a parsed ProPlanPeriod{count, unit} (unit ∈
second/day/week/month/year/lifetime) instead of a raw string.

- Add parse_plan_period() + ProPlanPeriod/ProPlanUnit (C++), mirrored by
  SESSION_PRO_BACKEND_PLAN_UNIT + plan_count/plan_unit on the C item.
- The unit is preserved, never canonicalized ("12m" != "1y" as values).
  "lifetime" -> {0, lifetime}; invariant count == 0 iff unit == lifetime.
- Closed grammar (a backend<->libsession contract, like the §5 status
  enum): an unrecognized code is a protocol error, not passed through raw.
- Reserves a testing-only `s` (seconds) unit; single-unit only ("1y6m"
  invalid). Response-parse only -- no wire or signing change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jagerman added a commit to jagerman/libsession-util that referenced this pull request Jul 22, 2026
…tion#14)

Parse the closed `plan` grammar (pro-wire-protocol.md §1 / Delta session-foundation#14) in
libsession rather than handing clients the raw wire code to reinterpret.
get-details items now carry a parsed ProPlanPeriod{count, unit} (unit ∈
second/day/week/month/year/lifetime) instead of a raw string.

- Add parse_plan_period() + ProPlanPeriod/ProPlanUnit (C++), mirrored by
  SESSION_PRO_BACKEND_PLAN_UNIT + plan_count/plan_unit on the C item.
- The unit is preserved, never canonicalized ("12m" != "1y" as values).
  "lifetime" -> {0, lifetime}; invariant count == 0 iff unit == lifetime.
- Closed grammar (a backend<->libsession contract, like the §5 status
  enum): an unrecognized code is a protocol error, not passed through raw.
- Reserves a testing-only `s` (seconds) unit; single-unit only ("1y6m"
  invalid). Response-parse only -- no wire or signing change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jagerman added a commit to jagerman/libsession-util that referenced this pull request Jul 22, 2026
Stand up an ephemeral session-pro-backend (throwaway postgres + flask with
provider egress stubbed) and drive all five Pro endpoints through libsession's
C++ API over real HTTP, asserting every request round-trips, the backend
accepts each signed digest, responses parse, and issued proofs verify against
the backend's live signing key. This catches wire-contract / lockstep drift the
self-consistent unit tests structurally cannot.

- tests/pro_backend/run-dev-backend.sh: hermetic launcher (initdb/pg_ctl +
  ephemeral signing key + flask, polls /status, runs testAll, tears down).
- tests/pro_backend/seed_payment.py: injects witnessed-unredeemed payments and
  revocations straight into the DB via the backend's own helpers.
- test_pro_backend.cpp: replace the legacy C-API [dev_server] block with a
  transport-abstracted (direct HTTP + zero-hop onion v4) [pro_live] suite:
  /status round-trip, full lifecycle flow (both providers), get_pro_revocations.
- .drone.jsonnet: "Debian sid (Pro backend live)" pipeline running [pro_live].

Tracks the Delta session-foundation#12 envelope, Delta session-foundation#13 sign-the-message-directly signing
path, Delta session-foundation#14 parsed plan billing-period, and the generations-table
revocation reshape.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jagerman added a commit to jagerman/libsession-util that referenced this pull request Jul 22, 2026
Stand up an ephemeral session-pro-backend (throwaway postgres + flask with
provider egress stubbed) and drive all five Pro endpoints through libsession's
C++ API over real HTTP, asserting every request round-trips, the backend
accepts each signed digest, responses parse, and issued proofs verify against
the backend's live signing key. This catches wire-contract / lockstep drift the
self-consistent unit tests structurally cannot.

- tests/pro_backend/run-dev-backend.sh: hermetic launcher (initdb/pg_ctl +
  ephemeral signing key + flask, polls /status, runs testAll, tears down).
- tests/pro_backend/seed_payment.py: injects witnessed-unredeemed payments and
  revocations straight into the DB via the backend's own helpers.
- test_pro_backend.cpp: replace the legacy C-API [dev_server] block with an
  onion-v4 [pro_live] suite (stable is onion-only): /status round-trip, full
  lifecycle flow (both providers), get_pro_revocations.
- .drone.jsonnet: "Debian sid (Pro backend live)" pipeline running [pro_live].

Tracks the Delta session-foundation#12 envelope, Delta session-foundation#13 sign-the-message-directly signing
path, Delta session-foundation#14 parsed plan billing-period, and the generations-table
revocation reshape.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jagerman added a commit to jagerman/libsession-util that referenced this pull request Jul 22, 2026
Stand up an ephemeral session-pro-backend (throwaway postgres + flask with
provider egress stubbed) and drive all Pro endpoints through libsession's C++
API over real HTTP, asserting every request round-trips, the backend accepts
each signed digest, responses parse, and issued proofs verify against the
backend's live signing key. This catches wire-contract / lockstep drift the
self-consistent unit tests structurally cannot.

- tests/pro_backend/run-dev-backend.sh: hermetic launcher (initdb/pg_ctl +
  ephemeral signing key + flask, polls /status, runs testAll, tears down).
- tests/pro_backend/seed_payment.py: injects witnessed-unredeemed payments and
  revocations straight into the DB via the backend's own helpers.
- test_pro_backend.cpp: replace the legacy C-API [dev_server] block with an
  onion-v4 [pro_live] suite (stable is onion-only): /status round-trip, full
  lifecycle flow (both providers), get_pro_revocations. The lifecycle flow
  covers the Delta session-foundation#15 endpoint split — get_pro_status + paginated
  get_payment_details, including an opaque next_cursor round-trip.
- .drone.jsonnet: "Debian sid (Pro backend live)" pipeline running [pro_live].

Tracks Delta session-foundation#12 envelope, session-foundation#13 sign-the-message-directly, session-foundation#14 parsed plan,
session-foundation#15 get_pro_status/get_payment_details split, and the generations-table
revocation reshape.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jagerman added a commit to jagerman/libsession-util that referenced this pull request Jul 22, 2026
Stand up an ephemeral session-pro-backend (throwaway postgres + flask with
provider egress stubbed) and drive all Pro endpoints through libsession's C++
API over real HTTP (direct + zero-hop onion v4), asserting every request
round-trips, the backend accepts each signed digest, responses parse, and issued
proofs verify against the backend's live signing key. This catches wire-contract
/ lockstep drift the self-consistent unit tests structurally cannot.

- tests/pro_backend/run-dev-backend.sh: hermetic launcher (initdb/pg_ctl +
  ephemeral signing key + flask, polls /status, runs testAll, tears down).
- tests/pro_backend/seed_payment.py: injects witnessed-unredeemed payments and
  revocations straight into the DB via the backend's own helpers.
- test_pro_backend.cpp: replace the legacy C-API [dev_server] block with a
  transport-abstracted [pro_live] suite: /status round-trip, full lifecycle flow
  (both providers, both transports), get_pro_revocations. The lifecycle flow
  covers the Delta session-foundation#15 endpoint split — get_pro_status + paginated
  get_payment_details, including an opaque next_cursor round-trip.
- .drone.jsonnet: "Debian sid (Pro backend live)" pipeline running [pro_live].

Tracks Delta session-foundation#12 envelope, session-foundation#13 sign-the-message-directly, session-foundation#14 parsed plan,
session-foundation#15 get_pro_status/get_payment_details split, and the generations-table
revocation reshape.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

3 participants