room

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package room manages the isolated workrooms of §6.2: one git worktree per active task under .devclean/rooms/<id>/, on branch devclean/<id>, with its own dependencies and port. Rooms are destroyed when the task ends.

Index

Constants

View Source
const IntegrationBranch = "devclean/_integra"

IntegrationBranch es la rama temporal donde se encadenan las oleadas: el trabajo verde de una oleada se mergea aquí y la siguiente oleada crea sus cuartos desde esta rama (Fase 2).

Variables

This section is empty.

Functions

func Branch

func Branch(id string) string

Branch returns the branch name of a task's room.

func Destroy

func Destroy(ctx context.Context, root, id string) error

Destroy removes the worktree and its branch. Missing pieces are skipped: Destroy always leaves a clean state.

func Dir

func Dir(root string) string

Dir returns the rooms directory of the repository at root.

func Integrar added in v0.2.1

func Integrar(ctx context.Context, root, id string) (string, error)

Integrar mergea la rama de una tarea verde en la rama de integración. Devuelve la salida del conflicto (vacía si el merge fue limpio) y un error si hubo conflicto u otro fallo.

func RamaExiste added in v0.2.4

func RamaExiste(ctx context.Context, root, id string) bool

RamaExiste reporta si la rama de un cuarto sigue en el repo. El trabajo verde de una corrida anterior vive ahí hasta que `ship` lo entrega, así que una corrida nueva necesita saber si puede apoyarse en él.

func ResetIntegration added in v0.2.1

func ResetIntegration(ctx context.Context, root, base string) error

ResetIntegration borra la rama y el worktree de integración previos y los recrea desde base. Corre al inicio de una corrida por oleadas.

Types

type Room

type Room struct {
	ID     string `json:"id"`
	Path   string `json:"path"`
	Rama   string `json:"rama"`
	Puerto int    `json:"puerto"`
}

Room is an isolated worktree for one task.

func Create

func Create(ctx context.Context, root, id, base string) (Room, error)

Create sets up the room for a task: a worktree on a new branch from base, dependencies installed per manifest, and a free port assigned. On any failure the half-created room is destroyed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL