Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: skip archived repo study targets

[._.]/ Adam Eivy9afae776e4fe
diff --git a/server/services/repoIntake.js b/server/services/repoIntake.js
index a7fd6a8d82..69200343ad 100644
--- a/server/services/repoIntake.js
+++ b/server/services/repoIntake.js
@@ -146,7 +146,7 @@ export async function queueRepoStudy(link, targetAppId = PORTOS_APP_ID) {
if (!isCloneReadable(link)) return { queued: false, reason: 'not-cloned' };
const app = await getAppById(targetAppId || PORTOS_APP_ID);
- if (!app?.repoPath) return { queued: false, reason: 'app-not-found' };
+ if (!app?.repoPath || app.archived) return { queued: false, reason: 'app-not-found' };
// Same four-part resolution every tracker-filing dispatch runs: the block
// telling the agent where to file, the tracker it names, and the
diff --git a/server/services/repoIntake.test.js b/server/services/repoIntake.test.js
index 38a023e164..9769d1abe8 100644
--- a/server/services/repoIntake.test.js
+++ b/server/services/repoIntake.test.js
@@ -132,6 +132,12 @@ describe('queueRepoStudy', () => {
expect(taskData.context).toContain('PLAN.md');
});
+ it('does not queue against an app archived after capture', async () => {
+ getAppById.mockResolvedValue({ ...APP, archived: true });
+ expect(await queueRepoStudy(LINK)).toEqual({ queued: false, reason: 'app-not-found' });
+ expect(addTask).not.toHaveBeenCalled();
+ });
+
it('degrades to the PLAN.md block when the origin lookup fails', async () => {
getAppById.mockResolvedValue({ ...APP, workTracker: 'auto' });
readOriginRemoteUrl.mockRejectedValue(new Error('not a git repository'));