Skip to content

release: develop → deploy/production (agent skill 0358, license 0155, 0253, 0302, 0211, 0288) - #444

Merged
adamkoot merged 33 commits into
deploy/productionfrom
develop
Dec 3, 2026
Merged

adamkoot merged 33 commits into
deploy/productionfrom
develop

Conversation

@adamkoot

@adamkoot adamkoot commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Carries six PRs; karczuRF confirmed his four can go to production. The rest is lore. Production diff in the comment below.

Expected diff: new Lambda code keys (the API handler serves the new OpenAPI document; the others because the hashes differ between build machines). No resource added, removed or replaced: #435's templates are byte-identical, and no route changes.

After the deploy: the workflow flushes the stage cache; /api-docs-json serves info.license MIT; the paid route still answers 402, keyed routes 403 without a key and 200 with one. By hand, from the release commit, noted in the tag's Release: make -C infra sync-portal-explorer, since #431 and #434 changed web/portal/public/openapi.json. preroll.sql is applied only by a pre-roll run (runbook 0286), not here. Once master moves, skills.stellar.org's card serves 0358's skill.

Rollback: a revert PR on deploy/production, deployed the same way.

adamkoot and others added 30 commits November 24, 2026 14:56
The OpenAPI document carried `info.license: {"name": ""}`, because
utoipa fills it from CARGO_PKG_LICENSE and no crate set one. The repo
has an MIT LICENSE since #419, so the workspace declares it and every
crate inherits it; utoipa writes it as `name` and SPDX `identifier`.

With the object filled, Redocly's `info-license-strict` is back on.
The portal's bundled copy of the document is refreshed to match.
…arity

default_granularity now returns None for timeframe=all, as seconds() does, so the arm the handler's guard always shadowed is gone and the type says all has no fixed default. The choice moves into resolve_granularity, with unit tests pinning that all takes the computed grain, including the 2029-06-08 step from 1d to 1w. No response changes.
Every full-range statement in preroll.sql now ends in SETTINGS max_partitions_per_insert_block = 1000 (rollup_sql::FULL_RANGE_SETTINGS). The tables are partitioned by month and a full-range run writes ~131 in one INSERT block, which production refused on 2026-09-22 with Code 252. A new integration test seeds 131 months and shows each of the six statements is refused without the clause and runs with it. The 0286 runbook keeps the URL-parameter form for older checkouts.
…tart

A candle is returned when its bucket starts inside [start, end]: a mid-bucket start drops that bucket, a mid-bucket end keeps it, and the newest candle can be the still-open current bucket. Stated in the /ohlcv OpenAPI description and params (bundled portal copy refreshed) and in overview section 4.2, whose auto-granularity table also stops claiming all defaults to 1d.
The 1024-character AlarmDescription guard walked only ObservabilityStack, so EventBridgeStack's ten -errors alarms (createWorkerLambda) could pass synth and fail mid-deploy. The guard moves to alarm-guards.ts and runs once over the whole App in createApp, before app.synth(). Templates unchanged.
finest_for_span keeps 1d only while span.div_ceil(DAY) < 5000, so from
Stellar genesis (2015-09-30) the grain turns weekly after 4999 days, on
2029-06-07 00:00:01 UTC, not on 2029-06-08 as stated. Spotted in review of
PR #432.
finest_for_span keeps 1d only while span.div_ceil(DAY) < 5000, so from
Stellar genesis (2015-09-30) the grain turns weekly after 4999 days, on
2029-06-07 00:00:01 UTC, not on 2029-06-08 as stated. Spotted in review of
PR #432.
finest_for_span keeps 1d only while span.div_ceil(DAY) < 5000, so from
Stellar genesis (2015-09-30) the grain turns weekly after 4999 days, on
2029-06-07 00:00:01 UTC, not on 2029-06-08 as stated. Spotted in review of
PR #432. Same date fixed in the 0211 task record.
1000 months from 2015 reaches ~2098, about 72 years from now, not 83.
The raised cap also removes the fast Code 252 failure for a full-range
15m/1h re-roll, which would instead write blocks x months small parts;
only 1w/1M have run with it. Spotted in review of PR #433.
__pycache__/ is already gitignored; the .pyc came in with a merge and
was tracked since. Spotted in review of PR #433.
Sizes above 1m are rebuilt from the size below on a schedule (15m every
minute up to 1w/1M once a day) and rewritten hourly up to 7 days back, so
the 'timestamp + granularity is past now' rule for a closed candle was
unsafe: a 1d candle read at 00:30 UTC can still lack its last hours.
State the refresh lag and the 7-day reconcile window instead, in the
overview, the /ohlcv OpenAPI description and the revision row.

Also state that end alone switches to the computed granularity, as start
does (timeframe=7d&end=... returns 15m). Spotted in review of PR #434.
A description built from a token resolves to an Fn::Join object, which
the guard counted as length 0, so an over-long one passed synth and failed
mid-deploy. It is now refused at synth. The walk also moves from L2
cloudwatch.Alarm to CfnAlarm + CfnCompositeAlarm, so raw and composite
alarms (same 1024 limit) are measured too.

tools/scripts/alarm-guards.test.mjs pins the guard: over-long fails, 1024
passes, a token is refused, raw and composite alarms are measured. The
last two fail against the previous guard. The production synth passes:
90 alarms, all plain strings, longest 1018. Spotted in review of PR #435.
…efault-granularity-arm-is-unreachable

refactor(0253): drop the unreachable all arm from default_granularity
…eds-partition-block-cap

fix(0302): let the full-range pre-roll write past 100 partitions
…indow-boundary-semantics

docs(0211): state that the ohlcv window is inclusive on bucket start
…on-length-guard-covers-every-stack

fix(0288): length-check every stack's alarm descriptions at synth
All four PRs merged into develop on 2026-11-30 after Stan's review:
- 0253: #432 (d3bee99)
- 0302: #433 (ef601af), writer probe on production recorded
- 0211: #434 (638beb8), overview revision row now links the archive
- 0288: #435 (9ea7b6c)

Each task records the review fixes, status completed, and moves to
archive/.
stellar-x402 0041 closed on 2026-12-01 and its task file became an archived directory; the old link answers 404.
Three routes have keyless /x402/v1 twins since 0356. The skill offers them
beside the free key: the stellar-x402 MCP tools when the agent has them,
else a short script on the upstream @x402/fetch, capped at one cent a
payment. Testnet preview: XLM and USDC only.

The key steps follow the shared sign-in: signing in issues no key, the
Prices API tab's Get API Key does.
The skill told the agent to ask for the payer's secret key, which puts it
in the transcript; the user now sets it in the MCP server's config or in
STELLAR_SECRET_KEY. After the payment was sent, a 402 with a
PAYMENT-RESPONSE, a 502 or a 504 may still settle (the crate's
settlement_failed and its /settle timeout), so the skill no longer says
nothing is charged until the answer is below 400. The facilitator link
pointed at a host whose root answers 404, and the overview's revision
history gets its row for the /x402/v1 twins.
The errors table told an agent to retry every 500, 502 and 504. On the paid
routes a 502 or 504 can come after the payment was sent, and the transfer may
still land, as the pay-per-request section already says: check the payer's
last transaction before paying again.
Without a key the skill told the agent to stop and ask for one, and it
paid with the connector as soon as it had the tools. akot's access flow
(2026-12-02): the agent offers the ways in that fit the request, each
with its cost, and waits: the stellar-x402 connector (first when its
tools are there), a free key through Discord, setting the connector up,
or the script. Outside the testnet sandbox only the key is offered. No
payment before the user has heard the price and said yes. The
connector's setup is summarized and linked to the stellar-x402 README.
The script blocks are unchanged.
The connector's setup cloned the default branch, which has neither
search_resources nor the listing guard: it now clones develop. The pay
sections act only on the user's choice and yes, and the quote before the
first payment covers the whole task. Step 1 states what every paid way
in costs and the sandbox's candles exactly, and recommends .env, since
an export in another terminal does not reach the agent. The task's
evidence now holds the final run, with P6 (the user says the payer key
is in .env).
An agent told the user to export STELLAR_SECRET_KEY, as the script
section said. An export in another terminal never reaches the agent, so
the script would stop with "STELLAR_SECRET_KEY is not set". The section
now asks for the project's .env and says why, as Step 1 already does
for the API key. Found in akot's manual run with a connector that has
no payer.
…nse-in-openapi

docs(0155): declare the MIT license in Cargo and the OpenAPI document
Merged as #431 (5b3efd9) after stkrolikiewicz's approval. Not
deployed: production serves the license from the next API deploy.
Only a 402 that carries a PAYMENT-RESPONSE (a failed settlement) may
still settle; one without it is a refused verification with an error.
From stkrolikiewicz's review of #442.
…in-the-agent-skill

docs(0358): pay per request in the agent skill
@adamkoot

adamkoot commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator Author

Production diff from the merge ref (refs/pull/444/merge at 415f670d), make -C infra diff-production, rustc 1.97.1 + cargo-lambda 1.9.1:

Matches the expected list: only the code of the 12 Lambdas changes (Compute 2, EventBridge 10); Secrets, ApiGateway and Observability have no differences. Nothing is added, removed or replaced. The code keys change partly because the hashes differ between build machines.

cdk diff also omitted 2 changes as "likely mangled non-ASCII characters"; --strict shows they are two ApiGateway output descriptions, deployed with ? where the template has → and — (ApiCustomDomain, ApiKeyId). Text only, no resource.

Full diff
Stack Prices-production-Secrets
There were no differences
Stack Prices-production-Compute
Resources
[~] AWS::Lambda::Function LedgerProcessorFunction LedgerProcessorFunction634DB1E3
 └─ [~] Code
     └─ [~] .S3Key:
         ├─ [-] a2b155a580f8fa2c30976fedc1b8e541ef9a994c427140d9f9c11db4ff3465e7.zip
         └─ [+] 6dc4b386d969d645bf22aa078afb6340e5fda00b7bf869ca63c281016247ca69.zip
[~] AWS::Lambda::Function ApiHandlerFunction ApiHandlerFunction9E589C02
 └─ [~] Code
     └─ [~] .S3Key:
         ├─ [-] a2ced4193f9ed576a00633d5087405c89d8d6585884e79c65c20890d6523f2b9.zip
         └─ [+] 86b20042ec2d7429c4781bbd6a9b30d9e13cf4e80859352cbbe055baee6ad3a0.zip
Stack Prices-production-ApiGateway
There were no differences
Omitted 2 changes because they are likely mangled non-ASCII characters. Use --strict to print them.
Stack Prices-production-EventBridge
Resources
[~] AWS::Lambda::Function AssetDiscoveryFunction AssetDiscoveryFunction8090EA48
 └─ [~] Code
     └─ [~] .S3Key:
         ├─ [-] 973d20c0c25fa7cd7a6d567f3ecb443aa96fa02949f992bc33115c485122f544.zip
         └─ [+] 48c0b2e72556585d5fe2485d63ab3527bda8436e6e693cb57047e8872f9569bb.zip
[~] AWS::Lambda::Function CleanupFunction CleanupFunction1604930F
 └─ [~] Code
     └─ [~] .S3Key:
         ├─ [-] 6bcea7599b1e05fd482dba5b3829776e4f037892961e6d308b75ec5d21332a1b.zip
         └─ [+] 34716dfa837cc4db7c3e81f263cbd69fc381e0b6f7c35678fa03b393eba24018.zip
[~] AWS::Lambda::Function SupplyFunction SupplyFunction2F1DDF8B
 └─ [~] Code
     └─ [~] .S3Key:
         ├─ [-] f3c3b4189ba87b37e93be1c3169b5d938410fa0799258a425cd3435e90556462.zip
         └─ [+] 1efbc70a9c77fd42b86d1b59ed967609e252d28da803428bf834040058a03492.zip
[~] AWS::Lambda::Function OracleFunction OracleFunction6E68C5BD
 └─ [~] Code
     └─ [~] .S3Key:
         ├─ [-] 4e096d98ee6984f6a65da0e8c538eac8c04cdf1e10f94d01cdef5a210b87d00d.zip
         └─ [+] f1a00922a35794c6da66fe2c4e9eb82ad1927ae444ed97283d6aa92cd13ec919.zip
[~] AWS::Lambda::Function EnrichmentFunction EnrichmentFunction65873741
 └─ [~] Code
     └─ [~] .S3Key:
         ├─ [-] c2e1a4764fa14bd0f97a2a195f9d41c6921f0479041d3a22d65bf2c9117f86ab.zip
         └─ [+] 43f416b2840e54eb711d6a50df4df9c89383864e6dffe0d3575af2012f5e5127.zip
[~] AWS::Lambda::Function CoarseSweepFunction CoarseSweepFunction5B06258F
 └─ [~] Code
     └─ [~] .S3Key:
         ├─ [-] d13925a25d154102f48f733e3b15757f6832d8100f526f26ab2047f105cfb76a.zip
         └─ [+] 091b9fe595d3ca8658f613a32190e96a7de96e8d31f089b7b62d8c60a7fb57c5.zip
[~] AWS::Lambda::Function BackfillFreshnessProbeFunction BackfillFreshnessProbeFunctionEA7303FE
 └─ [~] Code
     └─ [~] .S3Key:
         ├─ [-] 6320c8ebfdc1446cd400caa6aa179b149bf8a8324359a87bce92edb4ae5c7ded.zip
         └─ [+] 7a75dffce57cc8c0c138c0493a36818b7a3ceff7240bc98d08a4179cbad89873.zip
[~] AWS::Lambda::Function RollupFreshnessProbeFunction RollupFreshnessProbeFunctionB516919E
 └─ [~] Code
     └─ [~] .S3Key:
         ├─ [-] c9916e2f1c0d18cabdce401da3d7896b1ab6bf1a397d8f1470f248c66d1bfa03.zip
         └─ [+] 4cc53fea04b5d477355e74c212a41928592829d2464bef0d41f839d08d4d3ae7.zip
[~] AWS::Lambda::Function MtlsNotafterProbeFunction MtlsNotafterProbeFunction2C758EEE
 └─ [~] Code
     └─ [~] .S3Key:
         ├─ [-] fc3a785ddf381c3563e6bb36054bc47131094b390d329c39935e154e1f7516bb.zip
         └─ [+] 411cafff324747b54e377ae03f61bbf24b99b566e2b246cdd77d66c6cd2bbaae.zip
[~] AWS::Lambda::Function CoverageSweepProbeFunction CoverageSweepProbeFunction1727D195
 └─ [~] Code
     └─ [~] .S3Key:
         ├─ [-] c2320938f4fd2a33bd04a005a9b5f7d29142eee8c0fec5c1edfd37b49f934baf.zip
         └─ [+] 0db33574827bb2fea6e17989e4265630903c5552a3ccf22010ff726331f50b29.zip
Stack Prices-production-Observability
There were no differences
✨  Number of stacks with differences: 2

@adamkoot
adamkoot requested a review from karczuRF December 3, 2026 09:06
@adamkoot
adamkoot merged commit d817982 into deploy/production Dec 3, 2026
6 checks passed
adamkoot added a commit that referenced this pull request Dec 3, 2026
Merged as #442 (e512747) after stkrolikiewicz's review, released by
#444 as prod-2026-12-03 (d817982): the raw URL serves the new skill.
The card's description is a PR to stellar/stellar-dev-skill.
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.

2 participants