oxidecomputer / oxidecomputer/humility

Define a "task status" mechanism

Open
#22 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
584
Forks
63
Avg merge
3h
Merged PRs (30d)
2

Description

Idea from a discussion with @bcantrill:

So, we can pretty-print basically any Rust type we find in any program (that was compiled with debug symbols) at this point. We also have a few use cases where it would be nice to show the status of a task. One example is showing task disposition settings from jefe.

Rather than building task-specific knowledge into Humility, which I dislike, we could define a debugger interface for status information, e.g.

  • Each task can define a single top-level no_mangle symbol called TASK_STATUS (or something)
  • Humility is aware of this and, if it's present, can pretty-print its contents.
  • humility tasks can show status, either every time or (more likely) on request. This is a semi-verbose mode, less aggressive than showing the full TCB with -v, and more useful to people who aren't kernel developers.

Then, if a humility subcommand has specific knowledge about a task, it can use reflection to load the type out of TASK_STATUS and do whatever with it. Like enabling the jefe command to read out disposition info.

Obvious-to-me uses would include:

  • Stuffing an enum into it showing "current status" as a sort of summary of info that might also go into a ringbuf
  • Counters for event types in the fields of a struct

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name files, tests, or an entry point. Start by locating the existing task display and debugger reflection interfaces, then determine how a task-level status symbol could be discovered and rendered. Done means the interface and its use by humility tasks are defined and implemented, with coverage for the proposed status information.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.