MainworthyDocs Open Mainworthy

What you can customize

Mainworthy has settings for the instance, each project, cases, runs, and your browser. This page lists who can change each setting and links to instructions.

What you can customize, and where. Zoom, search and follow a path in the frame, or open it full screen.

Five levels #

Each level affects a different part of Mainworthy.

  • An instance is one running server and its data. Environment variables set the server address, mode, data directory, and PostgreSQL connection pools. Use Settings or the mainworthy command to manage people, agents, pipelines, and their tokens.
  • An instance can hold several projects. Each project has its own cases, runs, queue, and policy. The policy sets who answers each kind of question and which answers count. A person, agent, or pipeline can have different permissions in each project.
  • A case specifies whether people, the pipeline, agents, or a mix may test it.
  • A run says what it needs before it is complete. You choose that when you plan the run.
  • Your browser keeps your theme, sidebar choice, and personal home. Each person has a separate home for each project.

A capability is permission to do something in Mainworthy. The tables below use these names.

  • admin on a project lets you accept its policy changes. A project admin holds admin on one project. An instance admin holds it on every project. A person who is an instance admin can also invite people, issue tokens, and change grants.
  • produce lets you write and edit cases, report results, review, and send answers. It includes record and lets you propose policy changes.
  • record lets you report results and attachments and say that a change ended. A pipeline with record can also announce a deployment. That is the work a pipeline does.
  • read lets you see cases, results, questions, and the gate.
  • plan lets you start planned runs.
  • answer makes your answer count when the policy asks a project member.

A grant lists the capabilities an actor holds on a project or on every project. An actor can be a person, an agent, a pipeline, or the policy when it answers automatically. The instance names one person as its owner and uses your user name by default. The owner holds every capability.

What you can change #

WhatWhere you change itWho mayDetails
The policy presetSettings, Policy, "Preset", or mainworthy policy useproduce to propose the change and admin on the project to accept itPolicy
What happens to a test with no caseSettings, Policy, "Tests with no case", or mainworthy policy testsproduce to propose the change and admin on the project to accept itPolicy
When a report with no tests passesmainworthy policy empty pending or mainworthy policy empty nothing-requiredproduce to propose the change and admin on the project to accept itPolicy
How long a flaky answer holds and which case versions count as evidencemainworthy propose with a settings edit. Settings shows the current valuesproduce to propose the edit and admin on the project to accept itPolicy
Same-code detector settingsmainworthy propose with a policy edit. Settings shows the current valuesproduce to propose the change and admin on the project to accept itPolicy
Custom field definitionsSettings, Policy, "Custom fields", or a propose policy editIn Settings, an instance admin with project produce. On the command line, produce to propose the edit and admin on the project to accept itPolicy
ProjectsSettings, Projects, "Create a project", or mainworthy adminAn instance adminPolicy
What each person, agent or pipeline may domainworthy actor grant and actor ungrant. Settings, People shows people's personal and team grants and manages teamsAn instance admin who is a personPeople, agents and pipelines
Named rolesmainworthy actor grant --rolesAn instance admin who is a personNamed roles
Admin-issued tokensSettings, Tokens, or mainworthy token new, list and revokeAn instance admin. A token for an existing person needs that person or the ownerMake a token
Your personal command-line tokensSettings, Your sign-in, Your command-line tokensYou, signed in through the identity provider, or as the local ownerMake your own command-line token
How an agent connectsSettings, Connect, then mainworthy mcp or the /mcp addressWhoever holds an agent tokenLet an agent in
What a run asks forRuns, n, or mainworthy plan for methods, people and required jobsAnyone with planPlanned runs
Folders and tagsSuiteAnyone with produce. The policy decides whether the edit applies at onceWrite cases
Which methods a case admitsThe case's "Can be exercised by" section, or methods in its MarkdownAnyone with produce. The policy decides whether the edit applies at onceLet an agent in
Your homeSettings, Your homeYou, for yourself in this browser and projectThis page
The themeThe "Theme" button at the bottom of the sidebarYou, in your own browserThis page
The sidebar, open or collapsedThe button beside "Mainworthy" at the top of the sidebar, or [You, in your own browserThis page
Where the server listens, its mode, data directory and PostgreSQL connection poolsEnvironment variablesWhoever starts the serverConfiguration
How CI reportsA pipeline token, and MAINWORTHY_URL, MAINWORTHY_TOKEN and MAINWORTHY_PROJECT in the jobAn admin makes the token. Whoever edits the pipeline sets the restReport results
Backups and moving machinesmainworthy export and mainworthy importAn instance adminYour data

What the policy controls #

The policy controls who reviews edits and explains failures. It also determines which answers from agents count. The built-in presets range from loose to strict. The ci preset classifies failures automatically. Policy compares the presets and shows how to switch.

A policy change applies to the whole project. A person with project admin accepts the proposed change. Mainworthy keeps both the proposal and the accepted answer, called a decision.

Projects #

Each project keeps its own cases, queue, runs and policy. A new project starts with the preset you choose. The first project, scratch, exists so you can write a case before you configure anything.

If you go elsewhere while a project is being created, its confirmation leaves you in the project and screen you chose.

A project key uses lower-case letters, digits and hyphens. The key starts with a letter or digit and has at most 40 characters. You cannot rename or delete a project yet. The other commands pick a project with --project or MAINWORTHY_PROJECT, or use the only one when there is one.

Switch projects #

The sidebar names the current project under "Mainworthy". When you can read more than one project, the name is a button. To switch projects, follow these steps:

  1. Press the project name or g p. Mainworthy lists your projects, each with its key and policy.
  2. To find a project, type part of its name or key. The initial selection is the first project other than the current one.
  3. Press ↵ to open the selected project.

You stay on the same screen. From Queue you arrive in the other project's Queue. A case, question or run that was open stays in the previous project because its ref belongs to that project. Back returns to that item. With the sidebar collapsed, the button shows the first letter of the project's name.

On a phone, switch projects with these steps:

  1. Tap Menu.
  2. Tap the current project.
  3. Tap the destination project.

Actions offers "Switch project" as well. With a keyboard attached, g p opens the list. Use ↑ ↓ and ↵ to choose from the list, as on a desktop.

The palette also finds a project when you type a word of its name. Open the palette with ⌘ K. Settings, Projects lists the same projects, and a press on one opens its Settings.

A project of demo data #

To look around before you write a case of your own, fill a project with the demo.

$ mainworthy seed demo
seeded demo: 2000 cases, run R-54, 66 questions
http://127.0.0.1:7357/p/demo/suite

The demo is a shop's suite. Its cases are in 29 folders under eight areas: Checkout, Accounts, Orders, Catalog, Back office, Notifications, Mobile app and API. Each folder holds the scenarios of one feature, and each case has steps of its own. The project defines three optional custom fields: priority, the team that owns a case, and risk notes. Cases carry priority and team values. Checkout cases also have risk notes. The back office's cases came from TestRail and keep their TestRail ids as aliases. In the default demo, mainworthy get C5505 reads one. A feature that needs more cases than it has scenarios repeats them for another browser, language or kind of customer, as a real suite does. About a third of the cases have an automated test, and each test is linked to its case.

The pipeline also reports the shop's unit tests. No case names those tests. There are 60 files under tests/unit/, one open question each. Try selecting several rows in the queue to answer them together. To track every test without a case, open Settings, Policy and set "Tests with no case" to "Track without a case", or run mainworthy --project demo policy tests track. --unlinked-files sets how many files there are, from 0 to 500.

Two results in each of today's failing pipeline runs, and the agent's result, include step trails. Each step shows several actions with their own times, which add up to the step's time. For example, applying a coupon shows focus, typing the coupon, and pressing Apply.

The project holds fourteen days of history before today.

  • A pipeline named pipeline reported on main every night, and on one to three pull requests on most days. Two days of each week are quieter. The seed determines this pattern independently of the real weekday. Two nights found a defect. On one night, the services used by the tests were down. Some pull requests failed before they were fixed. A person answered each failure the day it was reported.
  • People planned a run every other day and tested its cases by hand. The older runs passed and closed. The one from two days ago found a defect and stays open, and yesterday's is half done.
  • Some cases were edited. Two cases that the API checks now cover were archived. An agent named reviewer reviewed two pull requests.
  • One automated test failed while quarantine excused its failures. A person checked the repair, then the quarantine ended.
  • Each pull request merged after its last report. The pipeline reported that the change ended, so Mainworthy no longer asks about that change. Today's pull request 482 is the only one open.

Today one test fails on main. Pull request 482 starts from that commit and fails the same test. Both failures include the test runner's trace as an attachment.

The pull request has a planned run named "Checkout regression". The agent reviewer logged a finding, one proposed edit, and a bulk proposal with one edit per catalog case, up to 201 cases. Along with the finding and both proposals, Queue asks about each of the two failures and a test that has no case. These six questions and the sixty unit-test questions make 66 in all.

Before the first report, the demo adopts the standard preset and sets it to ask about tests with no case. The pull request's failure stays open with a hint that the test also fails on the commit the pull request starts from.

Under the demo's standard preset, passed runs close automatically.

You can change the demo with four flags.

  • --cases sets how many cases, from 1 to 100000.
  • --seed is the number the demo is made from. The same seed gives the same cases, pull requests and failures on any instance. Another seed gives another demo of the same shop. The default is 1.
  • --days sets how many days of history, from 0 to 90. With 0 the demo holds today and nothing before it.
  • --unlinked-files sets how many files of unit tests have no case, from 0 to 500. The default is 60. Use 0 to leave only the six questions above. Demos with at most twenty cases omit the bulk proposal.

The history ends on the day you run the command. It does not move forward afterwards. A demo seeded a month ago shows the history ending on that day.

The seed command requires a project name each time. It creates the project if that name does not exist. The command does not read --project or MAINWORTHY_PROJECT. It fills only a project with no writes, so the demo cannot overwrite your work. If a seed stops halfway, send the same command again with the same flags. It finishes the rest and writes nothing twice.

A seeded project is a demo project, and stays one. Only a demo project accepts a write that says when it happened. Those writes give the demo its history. Every other project records the server's clock, and no flag or token changes that. Archives exclude the demo mark. The API page has the details.

seed needs a person who administers the instance, because it makes the project and the two actors. In server mode, give that person's token with --token or MAINWORTHY_TOKEN. The pipeline and the agent hold a grant on the demo project alone. The command revokes the pipeline and agent tokens when seeding ends. If seeding stops early, those tokens expire after an hour.

You cannot delete a project yet, so a manually seeded demo stays until you start with a new data directory. For a demo that follows deployments, set MAINWORTHY_DEMO=demo. After the server listens, a background worker compares its MAINWORTHY_COMMIT or the fallback SOURCE_COMMIT with the revision on the demo mark. A restart of a completed revision preserves your demo edits. A new deployed revision atomically swaps in a fresh demo at the same URL, moves personal and team grants across, and seeds it through the operation registry. Your edits in the demo are then replaced. The server creates a missing demo and refuses to replace an unmarked project. With no known commit it leaves existing work untouched and logs why it cannot refresh.

Start, health checks and sign-in do not wait for seeding, renewal or cleanup. The demo may be empty or partly filled while the worker seeds it. Shutdown stops the worker without waiting for demo writes.

If a seed stops, the next start resumes its command ids and original demo time instead of swapping again. The server renews the run it features on both fresh deployments and same-revision restarts. Retired projects are hidden from the project list and have no project-specific grants. Instance-wide grants, including the owner's, still allow reading by the retired key until cleanup deletes the data. The server refuses every write to a retired project. Cleanup uses bounded transactions that yield to other writes and sign-in. An interrupted cleanup resumes at the next start, even if MAINWORTHY_DEMO is unset. If a cleanup transaction fails, the server rolls it back and logs the failure. It keeps the retirement mark so it can retry. See configuration.

Cases, folders and tags #

Folders nest. A tag is lower case, starts with a letter or digit, and can hold -, _, . and /. Moving a case or changing its tags is an edit like any other. Under strict, that edit waits for a person.

A case lists the methods that may produce evidence for it. People are the default. Add agents so an agent's result can count in a run that asks for agents. An automated test does not depend on the list of methods. Its result can fill a slot through a link to the case or the case's ref in the test's name. A case keeps at least one method.

The theme #

Press "Theme" at the bottom of the sidebar to switch between light and dark. Until you do, Mainworthy follows your system. Your choice stays in this browser. If you switch back to the system theme, Mainworthy follows your system again.

The sidebar #

To make room for what you are reading, press the button beside "Mainworthy" at the top of the sidebar, or [. The sidebar becomes a strip 64 px wide. The strip keeps the project, the search, the six screens and the footer, each as an icon. It does not show the folders and tags of the Suite.

The pane on the right takes the width the sidebar gave up. That is the pane where you read a case, a question, a run or a change. The list keeps its width. In a window narrower than about 900 px the panes are at their least width and do not all fit beside the open sidebar. Part of the width goes to fitting them in first. In a window narrower than 760 px the list is above the other pane, and both get wider.

Press the button or [ again to open the sidebar. The choice stays in this browser, so a reload and your next visit find the sidebar as you left it. If the browser cannot save the choice, the sidebar still collapses for this visit but opens again on reload.

In the Suite, z sets the list to 340 px and gives the case the rest of the width. In a window wider than about 900 px, this widens the case further when the sidebar is collapsed. In a narrower window the list is under 340 px already, so z takes width from the case. In a window narrower than 760 px z changes nothing, because the case is under the list.

A phone has no strip. On a phone, Menu opens the sidebar over the pane. See Keyboard.

Choose your home #

Suite is the default home. To choose another home, follow these steps:

  1. Open Settings with g ,.
  2. Choose Your home.
  3. Pick Suite, Queue, a run, or a saved search.
  4. For a run or saved search, fill in the details described below.
  5. Press Save home.

For a run, enter its ref in this project, such as R-12. For a saved search, enter the search text, folder path, tag, or any combination. The search applies all the filters you enter and reads the current cases each time. Leave a field empty to leave that filter out. The browser saves one home search per project. It does not keep a library of named searches.

Press g h, or choose Go home in the palette, to open your home. On a phone, Actions offers Go home while either pane is shown. Opening the instance at / uses your first accessible project's home. Opening /p/<project> or /p/<project>/ without a query uses that project's home. A project address with filters or a link to an invitation, screen, case, question, or run keeps its own destination. Other paths outside /p/, such as /?utm=1 and /nowhere, open Suite in your first accessible project.

The browser stores your home preference separately for your signed-in name and each project. Sign out and keep drafts preserves the preference for your next sign-in in that browser. Sign out and clear browser data removes the preference. Clearing the site's data in your browser also removes the preference. The preference does not follow you across browsers. Saving your home changes nobody else's home or project data.

If the browser cannot read your home preference, it opens Suite. If saving fails, the form says so and keeps your previous home. If the saved run or search folder no longer exists, Mainworthy opens Suite and tells you that your home was not found. Open Settings to choose another home. If the lookup fails on entry, Mainworthy opens Suite with a notice. Mainworthy keeps your saved home so you can try Go home again. A search that matches no cases still opens with its saved filters.

What is fixed today #

The following behavior is fixed on every instance:

  • The five kinds of question are a proposed edit, a test with no case, a failed result, a finding, and closing a run. Decide in the queue lists the answers and keys for each kind.
  • The four verdicts of mainworthy gate are passed, failed, blocked, and pending. Its exit codes range from 0 to 3.
  • The six capabilities, read, record, produce, answer, plan and admin, and the kinds of actor. Named roles can require a particular reviewer but do not add capabilities.
  • A pipeline holds read and record at most, whatever its grant says.
  • Four named presets: loose, standard, strict and ci. Choose a preset under Settings, Policy.
  • The shape of a case: a title, preconditions, steps with expected results, methods, an automation intent, tags, a folder and the requirements it covers. A case can carry free fields of text in its Markdown, and project definitions can require values or limit them to a choice. The web capture and edit editor shows every defined field, marks required values and validates them before saving. Values can also be edited through Markdown or a propose body. Policy explains the definitions.
  • Sign-in uses a token, or a person signs in through the instance's one OpenID Connect identity provider after accepting an admin's invitation. The provider manages passwords, second factors, and account recovery. The owner can make a recovery invitation. A token works until you revoke it or it expires.
  • The instance needs PostgreSQL 18. compose.yaml starts it. The Local product layer has ended. Running the code elsewhere is possible but not yet supported.

Stable-trunk flakiness detection, a requirements coverage matrix, two-person approval, frozen evidence, gap waivers and dashboards you arrange yourself are not built yet. Same-code detection and quarantine are available, as are CSV imports and five fixed reports.

See also #

Mainworthy 0.1.0 · Licence · this page is docs/guide/customize.md in the repository