Skip to content

EBP-3105: Add Python API routing and the guaranteed pub/sub Quickstart - #10

Merged
aelsammak merged 2 commits into
devfrom
EBP-3105
Oct 5, 2026
Merged

aelsammak merged 2 commits into
devfrom
EBP-3105

Conversation

@aelsammak

@aelsammak aelsammak commented Oct 1, 2026 •

Copy link
Copy Markdown

What is the purpose of this change?

First slice of Solace Python API support in the solace-application-development skill (the Python mirror of the JCSMP routing work). Python requests now route to a Python entry file, and the skill can design any Python leaf and generate the Quickstart guaranteed pub/sub project from the EBP-3103 samples.

How is this accomplished?

  1. SKILL.md description adds the Python signals (solace-pubsubplus, MessagingService, PersistentMessageReceiver, "Solace Python API", building a Solace app in Python) and drops Python from the exclusions; JMS, the Solace Messaging API for Java, Go, .NET, and JavaScript stay excluded. The Messaging API for Java shares MessagingService and PersistentMessageReceiver with Python, so the routing text also stops on it explicitly. The description is 1014 of the 1024 characters the spec allows.
  2. API Selection gets a Python row, and the JCSMP row now requires Java or a JCSMP name. Unclear but Java routes to JCSMP, unclear but Python routes to Python, and a request with no language asks "JCSMP (Java) or Python?" first. The one exception is a saved solace-design.md the developer asks to build from: its title names the API.
  3. Invariant 3 names the registry per API (Maven metadata for JCSMP, PyPI info.version for Python). Invariant 5 refers to the API's own bundled verify script, and an API without one (Python, until EBP-3107) ends in the compile-only fallback every time. python.md states this in its own section.
  4. New references/python.md (mode detection with the three gates, the PyPI lookup command, canonical .md links, live exceptions: the Sphinx reference, PYTHON_API_RN, PyPI) and python/prerequisites.md (broker options, supported environments, no multiprocessing).
  5. python/design-mode.md: the same tree with five leaves. A guaranteed request-reply answer quotes the Request-Reply page and offers Request-Reply (Direct) or a Guaranteed Pub/Sub leaf instead.
  6. python/implement-mode.md and python/implement-guaranteed-pubsub.md: the door question, then the Quickstart guaranteed pub/sub path. Generated project shape: .venv, requirements.txt pinned to the version PyPI reports at generation time (or the developer's version when PyPI is unreachable, never unpinned), gitignored config.json (keys are the Python API property names), fixed script names guaranteed_publisher.py / guaranteed_subscriber.py / solace_connection_config.py, and the same four VERIFY: markers as JCSMP.
  7. Verification (Step 5): py_compile, an import smoke, and three shell checks (header on every .py file, checklist present, requirements.txt pin matches PyPI), then the handed-back run commands. A manual run on request follows the JCSMP exit 2 rule: a broker, credential, or queue-bind failure is reported and the code is not changed.
  8. Interim checklist (Step 6) follows the JCSMP master: one canonical doc link per Delivered and Your-responsibility item, command line credentials and stronger auth under Your responsibility, and the Grounding-docs and conformance items that Step 5 checks.
  9. Concurrency guidance: receive_async() is not asyncio compatible and calls the handler on a new thread per message, and any routine can ack before the receiver terminates (both from Consuming Persistent Messages); no multiprocessing (only the PyPI page states it).
  10. Interim pieces that later stories replace: the direct leaves and the Solace Suggested and Custom doors stop with "not yet available" (EBP-3106), and Step 6 carries the interim checklist until the master template lands (EBP-3107).
  11. Trigger evals: the two Python cases flip to positives (the guaranteed pub/sub one is must_pass), plus Go, JavaScript, Python asyncio without Solace, confluent-kafka, and Solace Messaging API for Java near-miss negatives.

Anything reviews should focus on/be aware of?

  • Local eval results:
    • Trigger evals, 3 runs per case, on the final commit: claude-sonnet-5 62/62 passed (100%), claude-opus-5-5 62/62 passed (100%), no must_pass failures. Haiku not run locally yet.
    • Output evals (JCSMP regression), claude-sonnet-5, 1 run, on the first commit (before the review fixes): 9/11 passed, live verify skipped (no broker configured). appdev-code-before-confirm-negative (must_pass) failed once: the model treated "skip any design discussion" as a full design and picked the Quickstart door itself. A 3-run majority of that case PASSED on both a clean origin/dev checkout and this branch, so I read it as model variance, not a regression. appdev-design-summary-positive failed on tool_use Write absent because Claude Code auto-memory wrote files under memory/; the skill wrote no project file. That grader needs an auto-memory exclusion (eval corpus change, not in this PR). The review fixes touch only Python files, the routing text, and the JCSMP prerequisites sentence; output evals were not re-run after them.
    • Python flow (no Python output corpus yet, that is EBP-3108): two temporary cases ran on Sonnet from a scratch copy on the first commit. The Quickstart guaranteed pub/sub flow passed every grader (design confirm, door question, PyPI resolution, header on every file, all four markers, no reconnect block, py_compile, import smoke, Python doc fetch). The new Step 5 shell checks were tested on a scratch project: silent on a correct project, and they reported a removed header, a missing checklist, and a stale pin.
  • No live round trip against a broker yet; the run is handed back by design until EBP-3107.
  • jcsmp/prerequisites.md changes one sentence: the Try Broker page covers local and cloud setup only, and does not mention a container, a VM, or an Appliance. The Python file copied the same sentence.
  • For EBP-3108: the output runner skips only target/ when it looks for generated files, so Python graders must also skip .venv/ or they match the API's own sources.
  • Fan-out is concrete for Python (one subscriber script per consuming service, guaranteed_subscriber_<service>.py, wired through the heads-up, run commands, and checklist); the JCSMP text leaves this open. Is that the shape we want?
  • No version bump (feature PR).

- Route Solace Python API requests (solace-pubsubplus, MessagingService, PersistentMessageReceiver) to a new references/python.md entry file; remove Python from the description's exclusions and keep JMS, Go, .NET, and JavaScript excluded
- Ask "JCSMP (Java) or Python?" when a Solace build request names no language; workspace files are facts to report, not the answer
- Generalize Invariants 3 and 5: the registry per API (Maven metadata for JCSMP, PyPI info.version for Python) and the API's own bundled verify script, with the compile-only fallback for an API that has none yet
- Add python/prerequisites.md, design-mode.md (five leaves; no guaranteed request-reply in the Python API), implement-mode.md, and implement-guaranteed-pubsub.md, mirroring the JCSMP files
- Quickstart generates a venv project with requirements.txt pinned to the version PyPI reports at generation time, a gitignored config.json, and the four JCSMP VERIFY: markers; it ends in py_compile plus an import smoke and handed-back run commands until the Python verify.sh lands
- Document the concurrency rules: receive_async() is not asyncio and calls the handler on a new thread per message, and the API cannot be used with multiprocessing
- The direct pub/sub and direct request-reply leaves, and the Solace Suggested and Custom doors, stop with "not yet available" for Python until EBP-3106
- Flip the two Python trigger cases to positives (the guaranteed pub/sub one must_pass) and add Go, JavaScript, asyncio, and Kafka Python near-miss negatives
- Scope the JCSMP routing row to Java, so a request with no language gets the JCSMP or Python question
- Let a saved solace-design.md title select the API, and restore the input contract sentence in Python design mode
- Exclude the Solace Messaging API for Java, which shares MessagingService and PersistentMessageReceiver with Python; add a negative trigger case
- Add the environment failure rule to the manual run, so a broker or credential failure never leads to code changes
- Scale the live broker heads-up, run commands, and round trip items to every fan-out subscriber; require an identifier for <service>
- Keep the requirements.txt pin when PyPI is unreachable
- Add header, checklist, and version drift checks to Step 5
- Align the interim checklist with the JCSMP master: doc link per item, command line credentials under Your responsibility, stronger auth and grounding items
- Ground the asyncio ack rule in the Consuming Persistent Messages page, and add traps for the parametrized_retry doc comment and PUBLISH_ACKED without delivery
- Name the missing verify script and the Request-Reply page in python.md
- Fix the Try Broker description in both prerequisites files to match the page
@aelsammak
aelsammak marked this pull request as ready for review October 2, 2026 16:37

@mtite-sol mtite-sol left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM!

@aelsammak
aelsammak merged commit c21a78b into dev Oct 5, 2026
4 checks passed
@aelsammak
aelsammak deleted the EBP-3105 branch October 5, 2026 17:12
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