9 Commits
Author SHA1 Message Date
Dario LipicarandClaude Opus 5 dc4635d3c4 ci: use logos-co/setup-nix-cache-action for Nix setup and caching (#83)
Replaces the per-repo installer + cachix pair with the shared action, which
installs Nix with the Logos Attic cache (cache.nix.logos.co) preconfigured and
publishes what the job builds — master to the public cache, every other ref to
ci.

Each converted job also gains

    environment: ${{ github.ref == 'refs/heads/master' && 'public-cache' || '' }}

because ATTIC_TOKEN_PUBLIC only exists inside that environment. Without it the
secret resolves empty on master and publishing is silently skipped — the job
still passes, so the omission would not surface as a failure.

The action installs Nix on every runner, macOS included. Sibling repos used
DeterminateSystems' installer there because cachix/install-nix-action collided
with the runner's pre-existing _nixbld users (eDSRecordAlreadyExists); that no
longer reproduces — logos-delivery-module converted the plain way and its
macos-latest leg passes — so the second installer is not carried over.

One property is deliberately not carried over: the old cachix step ran with
`continue-on-error: true` so a failed cache push could not fail a job whose
tests passed. The action exposes no equivalent, and adding one would also
swallow genuine setup failures now that the same step installs Nix rather than
only publishing at the end.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 23:50:27 -03:00
Dario LipicarandClaude Opus 4.7 c9f47391e5 feat: dependency interfaces — executable tutorial + guide (#64)
* feat: dependency interfaces tutorial (executable)

Add tests/tutorial-interface-dependencies.test.yaml — an executable
logos-doctest tutorial that builds calc_via_interface: a module declaring a
`calculator` interface and binding it to calc_module at runtime. Covers typed
sync/async/event calls, the no-validation rule, and the cross-repo interface
form. Registered in run.sh and CI (run + generate). Documents
interface_dependencies + bind_<interface> in the developer guide.

Depends on logos-cpp-sdk#74, logos-module-builder#108, logos-plugin-qt#8 —
the published flakes must carry these before the tutorial runs green in CI
(same release gating as the Composing Modules tutorial).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* address review: self-valid interface header + accurate CI step

- Interface calculator.h includes logos_module_context.h so the logos_events
  token is defined (valid C++ standalone); prose updated accordingly.
- CI step name/comment now reflect the third tutorial leaf
  (tutorial-interface-dependencies), not just the UI chain + Composing Modules.
(Copilot review, PR #64.)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* rerun

* rerun

* fix(tutorial): correct the no-validation negative test

Binding to a module that isn't loaded does NOT return a silent default — the
inner remote call fails and propagates, so `logoscore call ... sumVia
no_such_module` exits non-zero with RPC_FAILED. The step asserted "result":0
and let the non-zero exit fail the doctest step. Reframe it accurately: a bad
bind surfaces as an ordinary RPC failure (not a crash); absorb the exit with
`|| true`, capture stderr, and assert `"status":"error"`. Fix the prose and the
recap row to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-05 22:19:30 -03:00
Dario LipicarandClaude Opus 4.8 c84322d50c Add "Composing Modules" tutorial: calc_aggregator core module (#63)
* Add "Composing Modules" tutorial: calc_aggregator core module

New executable tutorial (tests/tutorial-composing-modules.test.yaml) that
builds calc_aggregator, a core (universal) module depending on calc_module,
showcasing every LogosModuleContext capability end-to-end via logoscore:

- modulePath / instanceId / instancePersistencePath getters
- durable per-instance persistence (a run counter that survives a restart),
  wired up in onContextReady()
- typed sync dependency calls (computeReport composes five calc_module calls
  into one map)
- typed async dependency call (fibonacciAsync with a callback)
- typed event subscription (onVersionReady on calc_module's versionReady)

Driven entirely from the logoscore daemon (no UI), mirroring Part 1's flow.

Also:
- README: list the tutorial and the calc_aggregator example module
- run.sh: build the module into outputs/ via --workdir (reusing the chain's
  calc_module, no rebuild) and clean its calc-data/ persistence dir
- ci.yml: run the new spec and verify its markdown generation
- outputs/: rendered tutorial + cleaned module source

The typed event subscriber requires logos-cpp-sdk PR #72 (LIDL parser: accept
reserved words as identifiers in name positions) so calc_module's versionReady
event sidecar round-trips; the doctest's event step stays red against published
deps until that lands and the module builder bumps its SDK pin.

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

* rerun

* Address review: warn about SDK dependency, make CI non-blocking

- prerequisites + event step: explicit toolchain note that the typed event
  subscriber needs logos-cpp-sdk#72 (calc_module's `version` event param
  collides with a reserved word), with a workaround (pin a fixed
  logos-module-builder, or skip the event step — everything else works on
  the released toolchain).
- ci.yml: split the Composing Modules spec out of the blocking UI-chain run
  into its own `continue-on-error: true` step so it doesn't block merges
  until #72 lands; a comment says to fold it back in once the dep ships.
- regenerate outputs/tutorial-composing-modules.md.

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

* Re-enable Composing Modules as a blocking CI tutorial

logos-cpp-sdk#72 (LIDL parser: reserved words usable as identifiers) is merged
and logos-module-builder has bumped its SDK pin, so calc_module's versionReady
event sidecar now round-trips and the typed onVersionReady subscriber builds on
the published toolchain.

- ci.yml: fold the spec back into the blocking UI-chain run (and the published
  two-column report); drop the temporary continue-on-error step.
- spec: remove the now-obsolete toolchain prerequisite note and the event-step
  heads-up.
- regenerate outputs/tutorial-composing-modules.md.

Verified end-to-end against the published toolchain: 77/77 doctest steps pass,
including the build and the full event round-trip.

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 09:46:55 -03:00
Iuri Matias d2502ab05d use logos-docspec
use logos-docspec

fix perms
2026-05-30 10:23:00 -04:00
Iuri Matias c6595b3664 generate links to report on check 2026-05-29 10:24:45 -04:00
Iuri Matias c79fc6aaf2 add support for a --report option that creates an html with the markdown and executed commands side by side 2026-05-29 10:11:00 -04:00
Iuri Matias c7f10f0767 update ci 2026-05-29 09:01:48 -04:00
Iuri Matias 366d2d6f44 add requires directive; updated tests 2026-05-29 09:01:42 -04:00
Iuri Matias c9641c2f98 add executable tutorials support; convert tutorial-wrapping-c-library to an executable tutorial
add executable tutorials support; convert tutorial-wrapping-c-library to an executable tutorial

add executable tutorials

update tutorial; generate steps

clarify workdir usage

update/fix tutorial
2026-05-28 10:37:22 -04:00