track staged publishing; use __exit__ only for cleanup.
Merge branch 'jortel-atomic-node-publish' into jortel-956839