[FEATURE] Audit authority, code quality and documentation in ttyd #2
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/ttyd#2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem and motivation
Audit
ttydthroughout Phase 6. Own trusted terminal sessions, PTY routing and authenticated control using startup-declared state and endpoints.Review each changed boundary at the final published revision. Prioritize security, reliability, then performance.
Proposed behavior and scope
Current inventory: 2 Cargo targets (1 bin, 1 lib); manifests:
Cargo.toml. Include explicit and automatically discovered targets, supported features and target-specific configurations.Inventory every startup/runtime grant and authenticated peer, then success, denial, cancellation, failed transfer, restart and teardown. Trace callers and downstream providers so names, numeric identities and retained aliases never become implicit authority.
Authority, security and reliability
Record each finding's affected revision, invariant, reproduction, owner, regression coverage and resolution. Report suspected vulnerabilities through SECURITY.md and keep sensitive details private. Record a result and rationale for each audit criterion, including caller responsibilities when this component has no process or Rust target.
Acceptance criteria
Checklist
missing_docsenforcement without blanket allowances or hidden-API escapes, warning-denied private-item rustdoc and an undocumented-public-API negative gate.cargo fmt --all -- --check, strict Clippy, unit/doctests and warning-denied builds/rustdoc for every owned crate/target under default and all valid feature, freestanding/host, SMP and profile combinations; test mutually exclusive combinations separately. Add focused VM regressions for runtime behavior and observe the older catalog and unit tests at the exact published heads.Alternatives and tradeoffs
Refactor within the component unless shared semantics justify extracting common code. Preserve regression coverage before deleting superseded paths. Profile before optimizing, and document ABI limits, hardware limits and explicit quotas. Preserve security and reliability requirements.
Tracking and rollout
feature/posix-compat; update linked WIP PRs after coherent signed checkpoints using canonical CONTRIBUTING.md messages.62a1ffd8b966f9ffd59c017d9dc83521f9491426; refresh component/dependency heads and their own CI evidence as implementation advances.Counted raw program context — producer/consumer design, 1 October 2026
The ordinary prompt boundary must preserve the complete authenticated program entry
without a 240-byte or UTF-8 adapter. This is descriptive data only: Launchd's
entry digest, manifest admission, native scope and object custody remain independent.
Launchd's remaining per-job retained display storage will migrate after this boundary.
Replace the contextual V1 types with PowerboxBeginContextRequestV2 and
TtyPowerboxPromptContextRequestV2 across LibIPC, Launchd, Powerboxd and Ttyd.
The fixed authority-free BEGIN (80 bytes) and prompt (128 bytes), private routes
and answer correlation remain unchanged. V2 context appends job generation u32,
a reserved zero u32 and program length u64; the prompt additionally appends selector
length u64. Prefixes are exactly 96 and 152 bytes. Raw program and then selector
bytes follow. Exact fixed shapes select their fixed codecs; every other shape
selects only V2, without retrying the fixed parser after a contextual failure.
The nonzero legacy contextual length occupies V2's reserved word, so retired V1
contexts reject rather than silently changing interpretation.
Programs use complete absolute normalized raw bytes; generation is nonzero.
Selectors remain complete nonempty NUL-free raw bytes. Counts must fit target
width and exact body extent before borrowing, retaining or encoding. Overflow,
unknown padding, short/long bodies and insufficient output leave storage unchanged.
No opcode, label, generation or byte count creates a capability or changes policy.
Powerbox retains the full original program and selector together in its existing
caller-sized arena, preserves both through compaction and clears retired ranges.
Prompt transport admits the complete body before calling Ttyd. Ttyd escapes each
non-ASCII/control byte, admits the whole rendered review, and retains existing
rollback and visibility-gated secure-input behavior. No truncated prompt or digest
shortcut may authorize consent. Surplus capability receipts retain their existing
independent disposal rules.
Migrate current controls and add raw/long geometry, retired-context refusal,
capacity atomicity, retained arena ownership/compaction and trusted rendering
controls. Document the coordinated immutable revision graph and remaining ordinary
Launchd storage work. Author controls without running tests, builds, checks,
generated documents or CI observation under the current request.
Native SEND and entry-digest
validation return a borrowed complete raw label; ordinary preparation copies it
before transport reuse and admits the sidecar in the remaining exact scratch. Labels create no capability or replacement authority.
Seven new controls cover long raw preparation, reused caller scratch, original
job ownership, capacity/identity refusal, compaction, stale generations, successor
transfer, literal startup geometry and missing/unaddressable budgets.
The containing native migration remains open for remaining provider/name adapters,
complete cross-provider lifetime/refusal controls and coherent runtime catalog
adoption. Existing broad acceptance remains unchanged. Full EriX guest build
generations, external Rust/LLVM rebuilding inside EriX and profiler evidence remain
required and unperformed.
Related records and contracts
[FEATURE] [P02.R71] Audit authority, code quality and documentation in ttydto [FEATURE] Audit authority, code quality and documentation in ttyderikinkinen referenced this issue from erix/vfsd2026-10-01 21:15:17 +02:00
erikinkinen referenced this issue from erix/vfsd2026-10-01 21:15:20 +02:00
erikinkinen referenced this issue from erix/docs2026-10-01 21:15:20 +02:00
erikinkinen referenced this issue from erix/integration2026-10-01 21:15:21 +02:00
erikinkinen referenced this issue from erix/posixd2026-10-01 21:15:22 +02:00
erikinkinen referenced this issue from erix/lib-ipc2026-10-01 21:15:22 +02:00
erikinkinen referenced this issue from erix/ramfsd2026-10-01 21:15:23 +02:00
erikinkinen referenced this issue from erix/e2fsd2026-10-01 21:15:23 +02:00
erikinkinen referenced this issue from erix/fatd2026-10-01 21:15:23 +02:00
erikinkinen referenced this issue from erix/exsh2026-10-01 21:15:24 +02:00
erikinkinen referenced this issue from erix/coreutils2026-10-01 21:15:24 +02:00
erikinkinen referenced this issue from erix/launchd2026-10-01 21:15:27 +02:00
erikinkinen referenced this issue from erix/launchd2026-10-01 21:15:27 +02:00
erikinkinen referenced this issue from erix/loaderd2026-10-01 21:15:28 +02:00
erikinkinen referenced this issue from erix/loaderd2026-10-01 21:15:28 +02:00
erikinkinen referenced this issue from erix/lib-ipc2026-10-01 21:15:29 +02:00
erikinkinen referenced this issue from erix/powerboxd2026-10-01 21:15:30 +02:00
erikinkinen referenced this issue from erix/powerboxd2026-10-01 21:15:31 +02:00
erikinkinen referenced this issue2026-10-01 21:15:32 +02:00