Skip to content

osy 0.19.4

Choose a tag to compare

@osysharp-publisher osysharp-publisher released this 12 Nov 00:30

This release closes several places where a deploy or a policy could give a wrong answer without saying so. Some things that passed before are now refused, each with the fix beside it, so read the breaking changes first. To upgrade, run osy upgrade, then osy update in a project to take the new kit releases.

Breaking changes

  • A deploy that would change what stored enum values mean is refused. A row stores an enum member's value, and a move rewrites no row. When a column's enum moves to another namespace, is renamed or is swapped for another, every stored value must still name the same member. Reordered or renumbered members are refused with ENUM_RETARGET_CHANGES_STORED_VALUES, naming the column and each value that would change. Fix: keep the old order in the new enum and add new members at the end, or give a member its old value (Parked = 1). Docs
  • The security lint reads more rows, and osy check fails on what it finds. The rule for organization rows open to every account (TENANT_ROWS_OPEN_TO_EVERY_ACCOUNT) now judges rows declared in your app's own packages, and rows that reach their organization through required references, such as a card on a board that belongs to a team. osy validate prints a warning. osy check fails. Fix: add the where the finding prints, for example where IsMemberOf(Board.Team). Docs
  • Policy forms that cannot answer the same everywhere are compile errors. A class value or a list passed to a policy from code is refused at the call. Fix: declare the parameter as the single value the body compares, and ask once per value. An enum's .Label or .Description in a policy or rule is refused, because both are translated for the reader. Fix: compare the member, its .Name or its .Value. Docs
  • A token with no address is refused. A command given OSYRIN_TOKEN or OSYRIN_ADMIN_TOKEN takes its server only from --server or the project's osyrin.json. With neither it stops before sending anything, where it used to fall back to the server you were signed in to. Fix: pass --server <url> in CI, or link the project. Docs
  • Your app grants every package that asks for authority, by name. Code in a package uses only what your app granted that package. A package that arrives through another one and needs a host, a secret or a client certificate is no longer covered by the package that brings it. The compile stops and prints the use line to write. Fix: add that line. Docs
  • A run-time error in a UI action fails its test. An index out of range, a null, a failed cast or a divide by zero in an action now fails the test at that step, under osy test and osy test --pixels. Fix: correct the action. A throw your app wrote and a refusal from the server are still outcomes a test can assert. Docs
  • osy cancel-runs asks how many runs you mean to end. A version with live runs needs --cancel-live <N>, where N is the number osy versions shows. --yes does not stand in for it. Docs
  • New warnings. THEME_MODE_MAP_WITHOUT_LIGHT when a theme token names a variant and no light value. PACKAGE_PAGE_FUNCTIONS_KEPT when a package page you left out still has callable functions behind it. A warning for a [Test] that queries the run tables directly. osy lint also has four new workflow rules, one of them workflow-zero-seats-beside-a-plain-wait.

Fixes

  • A policy called from code gets its arguments. Called from a function, a test or a workflow with an enum member, a string, a number, a bool or a date, a policy used to answer no for everyone on a clean compile. It now answers what a rule making the same call answers. A policy that derives a value from its argument (d.Name, "Duty." + d, k.ToUpper()) answers alike in a rule, a where and from code. Docs
  • A migration can retire a whole enum that has a namespace. drop enum Shop.Orders.JobStatus; is accepted as the deploy's refusal prints it, including for an enum that only moved namespace. A short name is refused with the reason. A line that could mean both a type and a member is refused, naming both. Docs
  • validate, lint and test make no network request when the lock resolves. That includes a workspace package with no lock of its own, which is now checked against its app's osyrin.lock. A loop of checks no longer spends a GitHub token's hourly limit. Docs
  • Workflow versions follow what changed. Editing the body of a namespaced function a workflow calls now makes a new version, so a run parked mid-body finishes on the body it started with. Moving a workflow further down its file no longer makes a new revision.
  • Parked runs keep up with a deploy. An in-place deploy that changes a workflow moves the runs still on its previous revision, with their clocks and waits. A wait the new version adds to a state is armed on runs already parked there. A deploy that keeps a fan-out no longer strands the runs parked on it. Docs
  • A child run is started by the principal you would expect. The innermost open runas block starts it, in every kind of body and in background work. Docs
  • Smaller fixes. A conditional Autostart over a base type no longer fails the commit of a subtype row. A field left out of a class argument keeps its declared default. A member made [Searchable] on an existing table gets its search column in the deploy. A workflow raise inside a try is held until the block completes. The first person to sign up is the app's Admin even when the app declares actors. osy status shows an app that serves no version yet. osy compile --json keeps its output clean JSON. Kit and database downloads retry a failed request.
  • Your local data stays. Starting a local platform no longer deletes the stopped platform of a project you still have. Only osy instances --prune does. Docs

Language

  • A workflow in several files. The root workflow W { … } lists every state and writes state Building; for a body kept elsewhere. A partial workflow W { state Building { … } } in another file gives that body. The split workflow is the same revision as its one-file form, so running workflows do not notice the move. Docs
  • Start a run by name. <Workflow>.Start(row) starts one run for a row whatever Autostart says, and <Workflow>.StartAgain(row) gives a row whose run has ended a new one. <Workflow>.Version is the app version the code runs in. Docs
  • A policy takes any single value. An enum member, a string, a number, a bool, a date, or a nullable one, beside rows and ids. Docs
  • A stream<T> REST endpoint answers server-sent events. Each yield return is sent as it happens, with open, item, done and error events. Docs
  • MCP tool failures carry stable codes. A failed call says why in _meta["osy/error"]: denied, not-found, invalid, conflict, unavailable, too-many-attempts or fault, and a refused workflow step adds a reason such as not-holder. Docs

Tooling

  • osy migrate prove. Proves a workflow migration before it ships. It parks a run in every state of the old version on a throwaway local platform, deploys the new version with your .migration, and reports each state as moved, ended, refused, lost or in the wrong state. It exits 1 when any state failed. Docs
  • osy deploy shows each stage and waits on the platform's word. Dry run, backup, build and migrate, and roll out are printed with their times, and a failure names its stage. The deploy succeeds when the platform says the version is served. A separate line says whether the app's address answers with it. --wait sets how long to wait (45 minutes by default). Exit codes: 0 served, 1 refused or failed, 2 the wait ended and the deploy goes on. It also refuses before building when the environment runs a release older than what your app calls. Docs
  • osy query names your app's functions and workflows. osy query "CountOpen()" runs the deployed body. A function that writes is refused. Docs
  • A local platform that stays up. --keepalive 0 turns the idle stop off, and an open page keeps its local platform running however long you only watch. Docs
  • The layout check. layout "Acme.Shop"; in the manifest turns on a check that each model file opens with the namespace its folders spell and is named after a declaration in it. Opt in; without the line nothing is checked. Docs
  • Tests say more. osy test --announce prints a line as each test starts, so a hang names its test. Cost.RequestPathsSince(mark) and Cost.StatementLinesSince(mark) say which requests and which lines a step's cost came from. A test that lost a brace is one error that names what it swallowed. Docs

UI kit

  • Six status tones. Tone.Info and Tone.Waiting join the others on Badge, Lamp and nav badges, with a filled pill. Badge(size: Size.Sm) is a count pill and Tab(count:) draws it. Docs
  • Link tabs and a native select. Tab(to:) is a tab that is a link. Select, Option and the kit's SelectField give you the browser's own select. Bullets and Bullet draw a list with markers. Docs
  • Declared settings do more. A [Settings] section can save only through a function you name (Writer), open a review of the changes before saving (Save = Review), hold a list of rows edited in a drawer, be kept per site or team with a chooser, and say where each value comes from. Docs
  • Forms line up. The kit's form parts sit on one grid, so fields in the same column have the same width.

Kits

  • UserManagement 0.10.0. AddIntegration(name, role, organization: company) adds an integration whose role is held in one organization and nowhere else: an API key for one customer or one team. MayInvite may now read a table, such as permissions kept as rows. Write PeopleManager() and the page asks the server who may invite. Docs
  • HumanRequests 1.5.0. An option says what happens, what speaks for and against it, and who acts. A request can carry a recommended option with its reason, taken with AcceptRecommendation. A new kind, OwnerStep, asks a person to do one step and answer Done. Docs
  • Memory 2.1.0. Memory.ByMeaning() tells a page whether search by meaning is on, or running on words alone. Docs
  • The UI kit changes above come with osy 0.19.4 itself (the Ui kit it carries). Ui.Looks 0.5.0 gives every look its Info and Waiting colours.
  • Also released: KnowledgeBase 1.3.0, Notifications 1.4.0, and the ten Shop.Looks kits at 0.5.0.